We study risk and maturity transformation when bank liabilities facilitate trade in goods markets and households face aggregate liquidity shocks. Banks' balance sheets transform aggregate investment risk providing a stable source of liquidity to households. When investments are sufficiently risky, bank liabilities transform risk and maturity: liabilities are less risky and have shorter term payoffs than banks' real investments. When maturity transformation is socially efficient, aggregate long-term liquidity is scarce raising the relative price of long-term bank issuances. In the competitive equilibrium banks provide too little maturity transformation relative to the social optimum.