Practice Problem for Lecture 3


In this problem, we are taking Treasury STRIP prices and using them to create a yield curve. To keep things manageable, we are taking STRIP prices quoted on 11/15/04, which allows us to use STRIPs maturing on 5/15 and 11/15 each year for many years out to obtain "exact" half-years, giving us bond-equivalent yields without working on fractional periods.

Here are instructions to step you through the yield curve and smoothing calculations

1. First, read in the raw Treasury STRIP price data from the file strip.txt into your favorite statistical package or spreadsheet program. The first three columns give the month, day, and year on which the strip matures, and the fourth column gives the discount factor (price per dollar of face value of the STRIP). The discount factor in the fourth column is what you will be using; we will call this variable disc.

2. Next, create a corresponding time-to-maturity variable with values ttm= 0.5, 1.0, 1.5, ... 25.5. Create a scatter plot of discount factors as a function of time-to-maturity to confirm that the data make sense.

3. Now, compute discount bond yields. This uses a formula from the slides using half-year compounding. Note that in half-years, time-to-maturity is doubled. Once we compute the 6-month time-to-maturity, we multiply by 2 to state it in the traditional annual units: yield = ((1/disc)^(1/(ttm*2)) - 1)*2. Plot zero-coupon yields as a function of time-to-maturity.

4. Compute forward rates, using the same half-year bond-equivalent convention: forward(0,t) = (disc(0,t-1/2)/disc(0,t) -1)*2. Plot forward rates as a function of maturity.

5. Fit the zero-coupon curve using the regression suggested in the slides: yield = a + b exp(-ttm) + c exp(-ttm/3) + d exp(-ttm/9) + e exp(-ttm/27) + error. Plot the raw zero-coupon yields and the fitted values (yieldfitted = a + b exp(-ttm) + c exp(-ttm/3) + d exp(-ttm/9) + e exp(-ttm/27)) against time-to-maturity.

6. Plot the raw discount factors and the fitted values (discfitted = 1/(1+yieldfitted/2)^(2*ttm)) against time-to-maturity.

6. Plot raw implied forward rates and the fitted values (forwardfitted(0,t) = (discfitted(0,t-1/2)/discfitted(0,t) -1)*2) to the original values. Most practitioners feel that the sort of fitted values we obtain give a more accurate picture of the market than the unsmoothed numbers.

Note: We thought about using LIBOR rates for the example, but that is a bit complicated because long maturities LIBOR rates seem to have swap prices (from which bond prices might be inferred) but no pure-discount bonds. Using the STRIP prices is more straightforward.