Trading frictions in financial markets affect more long- than short-term bonds generating an upward sloping yield curve. Long-term financing is more expensive in economies with higher trading frictions so firms choose to borrow and invest in shorter horizons and lower productivity projects. The theory guides a new identification of the slope of liquidity spread in the data. We measure and calibrate the model for the US, and counterfactual exercises suggest that variations in trading frictions can have significant effects on maturity choices and investment. A policy intervention improves liquidity, reduce long-term financial costs and promotes investment in longer-term projects.