We build a general equilibrium model of banks' optimal capital structure, where bankruptcy is costly and investors have heterogenous endowments and incur a cost for participating in equity markets. We show that banks raise both deposits and equity, and that investors are willing to hold equity...