We find optimal allocation paths for a life-cycle investor with stochastic labor income and predetermined pension contributions, who faces borrowing and short-selling constraints and converts his wealth into an annuity at retirement. We specify an affine term structure model, allowing for stochastic interest rates, stochastic ination, and bond return predictability. We calibrate the model parameters on the basis of data for a European investor. We develop a method based on numerical simulations to solve the allocation problem by means of dynamic programming. Compared to a market with constant interest rates, we find that the investor has additional hedging demands for bonds. When bond returns are predictable, the investor should time bond markets.These timing effects tend to dominate life-cycle effects.