A multi-factor model for the valuation and risk management of demand deposits