Sample Data for the Basic Building Blocks of Yield Curve Smoothing
In Part 4 of this series, we continue to use the same input data to the smoothing process that we used in Part 3. We refer the reader to Part 3 for numerous examples of past U.S. Treasury yield curve data that have curves that are too complex for the Nelson-Siegel approach to fit the data exactly. We continue to insist in this section of our series that any smoothing technique that does not fit the market exactly is unacceptable for practical use. We deal with the issue of “bad data” in a later post in this series. In the meantime, we continue to fit this raw data with our derived “best” yield curve.
Example B: Linear Yields and Related Forward Rates
As always, unless otherwise noted, “yields” are always meant to be continuously compounded zero coupon bond yields and “forwards” are the continuous forward rates that are consistent with the yield curve. As in part 3 of this series, the first step in exploring a yield curve smoothing technique is to define our criterion for best and to specify what constraints we impose on the “best” technique to fit our desired trade-off between simplicity and realism. We answer the nine questions posed in Part 2 of this series. In this installment of the series, we make just one modification in our answers to those nine questions and DERIVE, not assert, the best yield curve consistent with the definition of “best” given the constraints we impose.
Step 1: Should the smoothed curves fit the observable data exactly?
1a. Yes. As we noted in Part 3, with only six data points at six different maturities, it would be a poor exercise in smoothing if we could not fit this data exactly.
Step 2: Select the element of the yield curve and related curves for analysis
2a. Zero coupon yields
2b. Forward rates
2c. Continuous credit spreads
2d. Forward continuous credit spreads
2a. Zero coupon yields is our choice as in Part 3 of the series.
Step 3: Define “best curve” in explicit mathematical terms
3a. Maximum smoothness
3b. Minimum length of curve
3c. Hybrid approach
3b. Minimum length of curve. We continue with this criterion for best for a few more installments in this series. The following article on www.wikipedia.com explains how to calculate the length of a curve given the mathematical function that produced the curve:
The length s of a yield curve or forward rate curve between maturities a and b is
where f’(x) is the first derivative of the yield curve or forward rate curve. We want to minimize s over the full length of the yield curve.
Step 4: Is the curve constrained to be continuous?
4b. Yes. This is the big change for Example B. In Part 3 of this series, we found that allowing discontinuities in the yield curve did indeed produce a very short yield curve, but the gaps in the step-wise constant yields and forward rates were unrealistic. We seek to remedy that in Part 4 by insisting on a continuous yield curve. It goes without saying that, when we impose more constraints on the “best” yield curve, we will be intentionally selecting a yield curve that is not as “short” (under our current criterion for best) as the yield curve derived in Part 3. We are willing to make that trade off in order to gain realism in our yield curve fitting.
The remaining five choices are the same as Part 3 in this series. We will change our answers to questions 5-9 as we progress through this series on basic building blocks of yield curve smoothing.
Step 5: Is the curve differentiable?
5b. No. We know this may give us “kinks” where the five line segments we derive fit together, but at least for now we’re willing to tolerate this potential problem.
Step 6: Is the curve twice differentiable?
6b. No. As noted in Part 3, the curve will not be twice differentiable at some points on the full length of the curve.
Step 7: Is the curve thrice differentiable?
7b. No. The reason is due to our choice of 5b.
Step 8: At the spot date, time 0, is the curve constrained?
8a. Yes, the first derivative of the curve is set to zero or a non-zero value x.
8b. Yes, the second derivative of the curve is set to zero or a non-zero value y.
8c. No. For simplicity, we again answer No to this question.
Step 9: At the longest maturity for which the curve is derived, time T, is the curve constrained?
9a. Yes, the first derivative of the curve is set to zero or a non-zero value j at time T.
9b. Yes, the second derivative of the curve is set to zero or a non-zero value k at time T.
9c. No. Again, we choose No for simplicity and relax this assumption later in the blog.
Now that all of these choices have been made, both the functional form of the line segments and the parameters that are consistent with the data can be explicitly derived from our sample data for Example B.
Deriving the Form of the Yield Curve Implied by Example B
The key question in the list of 9 questions above is question 4, where we now insistent on the continuous nature of the yield curve, unlike our Part 3 smoothing effort. We note that by virtue of our choices in questions 5-9, these yield curve pieces are also not subject to any constraints except that the five “curves” joining the six observable yields meet each other at those maturity points or “knot” points. All we have to do to get the “best” yield curve is to apply our criterion for “best”—the curve that produces the yield curve with shortest length—subject to the constraint of meeting at the knot points
Since our objective is to join two dots on a piece of paper, we know from the old saying that “a straight line is the shortest distance between two points” that our “best” yield curve will consistent of five straight lines that, unlike Example A, will not be flat unless all of the observable yields are equal.
We can again measure the length of each line segment, thanks to Pythagoras, whom we invoked in Part 3 of this series:
As we noted in Part 3 in this series, the functional form of the “best” yield curve given our definition and constraints can be derived more elegantly using the calculus of variations as Oldrich Vasicek did in the proof of the maximum smoothness forward rate approach in Adams and van Deventer (1994), reproduced in Chapter 8 in van Deventer, Imai and Mesler’s Advanced Financial Management (John Wiley & Sons, 2004). We omit that step here since the answer is so intuitive.
Each line segment has the linear form.
y=a + bt
We call the first of the five functions y1(t) with intercept a1 and coefficient of t b11. The first “1” refers to line segment 1 and the second “1” refers to the power of t. Later in this series we will invoke higher powers of maturity t and we use this labeling now for consistency with later installments in the series. For each linear segment that we want to fit, we know the line must run from yield y1 at maturity t1 to yield yi+1 at maturity ti+1. This is a middle school math problem of two equations and two unknowns, the coefficients ai and bi1. For comparability with what we do later in this series, we lay out the 2 equations for each of the five line segments in matrix form:
For ease of exposition, we’ve labeled each row of the coefficient matrix with an equation number and each column with the parameter associated with the coefficient in that row. In the first row, the equation says we must have 1a1+0b11=4%, that is the first line segment evaluated at t=0 must produce our input data of 4%. The second row says we must have a linear segment such that a1+ 0.25b11=4.75%, so that when the first line segment is evaluated at the knot point for a maturity of 0.25 years, we will produce a yield of 4.75%. The other 8 rows of the matrix describe the remaining 8 equations.
We invert the matrix to get the following:
We then multiply this inverted matrix times the y vector above to solve for all 10 coefficients that are consistent with our 6 input yields:
We can also derive the coefficients for the forward rate segments consistent with this yield functions by using the fourth relationship of these links between continuously compounded yields, forwards and zero coupon bond prices:
This table summarizes the yield and forward rate coefficients in each segment. We also use Pythagoras’ formula above to calculate the total length of the yield curve as 10.9866533:
When we look at the plotted zero yields and forwards for Example B’s linear yield curve, we find good news and bad news:
The good news is that the yield curve (in red) both (a) fits the observable yield data, denoted by black dots, perfectly and (b) is continuous. The bad news is that we have identified our challenge for Part 5 of this series—we want to impose continuity on the forward rates as well, because we now realize that the constraints we imposed in Example B can be made still more realistic.
We gain some additional insights by overlaying the smoothing from Example B with the Nelson-Siegel yield curve and forward rates that we fitted in Part 3 of this series:
The Nelson-Siegel yield curve, plotted in green, is shorter (our criterion for best) than the Example B yield curve, but for a very bad reason: The Nelson-Siegel yield curve doesn’t fit the data, so of course it’s shorter! We reject the Nelson-Siegel approach (again) for this reason. By examining what’s plotted above, however, we realize something else—the “shortness” of the yield curve is a logical virtue, but there is another one that we prize highly for its realism: the smoothness of the yield curve. For that reason, later in this series, we will use smoothness as our criterion for “best.”
The table below summarizes the criterion for “best” that we have used so far, along with the constraints we have imposed and the length of the yield curves derived:
Both Examples A and B fit the data perfectly. Example A (because we are not counting the vertical jumps in the yield curve at each knot point) is only 10 units in length, compared to the 10.9867 length of the linear yield curve in Example B. We judge Example B “better,” however, because Example A was derived without the constraint that the yield curve be continuous. We realized after the fact that such a constraint is essential to realism. Because the Nelson-Siegel approach fails the most basic constraint, consistency with the observable market yields, we again reject it as unacceptable.
In Part 5 of this series, we impose the continuity constraint on forward rates and again derive the “best yield curve.”
Donald R. van Deventer
November 20, 2009