We model corporate liquidity policy and show that aggregate risk exposure is a key determinant of how firms choose between cash and bank credit lines. Banks create liquidity for firms by pooling their idiosyncratic risks. As a result, firms with high aggregate risk find it costly to get credit...