We propose a model with segmented markets that delivers endogenous variations in term spreads driven by banks' portfolio decisions while facing maturity risk. Future profitability influences the term premium that banks require to carry this risk. When expected profitability is relatively high (low) spreads are low (high). Spread fluctuations feed back into the macroeconomy through investment decisions. Econometric evidence corroborates this link between expected financial profitability and yield spreads. Finally, we analyse unconventional monetary policy by allowing banks to sell assets to the central bank. These interventions exploit a new channel of policy transmission through banks' portfolio choice affecting the yield curve.