The demand for long-term deposits of a financial intermediary: theory and evidence