Financial firms raise short-term debt to finance asset purchases; this induces risk shifting when economic conditions worsen and limits their ability to roll over debt. Constrained firms de-lever by selling assets to lower-leverage firms. In turn, asset–market liquidity depends on the system-wide distribution of leverage, which is itself endogenous to future economic prospects. Good economic prospects yield cheaper short-term debt, inducing entry of higher-leverage firms. Consequently, adverse asset shocks in good times lead to greater de-leveraging and sudden drying up of market and funding liquidity.