The most popular measure of the timing of a bond’s cash flow is term to maturity — the number of years until final payment. But term to maturity ignores the amount and timing of all cash flows prior to the final payment. Duration takes into account interim cash flows as well as the final payment, weighting each by its present value.
There is a direct relation between the duration of a bond and its price sensitivity to changes in market interest rates, whose term structure is constantly changing. The active bond portfolio manager will maximize the duration of his portfolio when he expects interest rates to decline. On the other hand, the manager who must fulfill an ending wealth requirement at a specific investment horizon faces two kinds of risk — price risk and coupon reinvestment risk: If rates increase after the bond is purchased, the price of the bond in the secondary market will fall; if rates decrease, interim coupon payments will be reinvested at lower rates.
The manager can immunize his portfolio from interest rate risk by setting the duration of the portfolio equal to the desired horizon. This follows from the fact that duration is the investment horizon for which the price risk and the coupon reinvestment risk of the bond portfolio have equal magnitudes but opposite signs — i.e., for which their effects on the portfolio’s ending wealth cancel each other out.