ABOUT THE AUTHOR

Donald R. Van Deventer, Ph.D.

Don founded Kamakura Corporation in April 1990 and currently serves as Co-Chair, Center for Applied Quantitative Finance, Risk Research and Quantitative Solutions at SAS. Don’s focus at SAS is quantitative finance, credit risk, asset and liability management, and portfolio management for the most sophisticated financial services firms in the world.

Read More

Basic Building Blocks of Yield Curve Smoothing, Part 6: Quadratic Yield Splines and Related Forwards versus Nelson-Siegel

12/03/2009 03:34 AM

In Part 6 of our series on the basic building blocks of yield curve smoothing, we learn from our results in Part 5 (linear forward rates).  We found in Part 5 that, for forward rates to be continuous and linear, we induced too much of a saw-tooth pattern in forward rates, even though the yields implied by these forward rates looked reasonable. In this post, we turn to Example D, in which we seek to “take the teeth out of the saw tooth pattern” by requiring that the first derivatives of the curve segments we fit be equal at the knot points.  We use a quadratic spline of yields to achieve this objective, and we optimize to produce the “maximum tension/minimum length” yields and forwards consistent with the quadratic splines. Finally, we compare the results to the popular but flawed Nelson-Siegel approach and gain still more insights on how to further improve the realism of our smoothing techniques.

Sample Data for the Basic Building Blocks of Yield Curve Smoothing

In Part 6 of this series, we continue to use the same input data to the smoothing process that we used in Parts 3 through 5.  As before, 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. In the meantime, we continue to fit this raw data with our derived “best” yield curve.

Example D: Quadratic Yield Splines and Related Forward Rates

As always, “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.  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 again answer the nine questions posed in Part 2 of this series.  In this installment of the series, we make two more 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
1b. No

1a. Yes.  Our answer is unchanged.  With only six data points at six different maturities, a technique which cannot fit this simple data (like Nelson-Siegel cannot) is too simplistic for practical use.

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 for Example D. We continue to observe that we would never choose 2a or 2b to smooth a curve where the underlying securities issuer is subject to default risk.  In that case, we would make the choices in either 2c or 2d.  We do that later in this 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.  As noted in earlier blogs, the following article on www.wikipedia.com explains how to calculate the length of a curve given the mathematical function that produced the curve:

http://en.wikipedia.org/wiki/Arc_length

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.  Our answers in Steps 4 and 5 make the analytical valuation of s possible for the first time.

Step 4: Is the curve constrained to be continuous?

4a. Yes
4b. No

4b. Yes.  As in Examples B, we insist on continuous yields and see what this implies for forward rates.

Step 5: Is the curve differentiable?

5a. Yes
5b. No

5a. Yes.  This is the first major change in Example D.  We seek to take the spikes out of yields and forward rates by requiring that the first derivatives of two curve segments be equal at the knot point where they meet.

Step 6: Is the curve twice differentiable?

6a. Yes
6b. No

6b. No. As noted in Parts 3 through 5, the curve will not be twice differentiable at some points on the full length of the curve.

Step 7: Is the curve thrice differentiable?

7a. Yes
7b. No

7b. No. The reason is due to our choice of 6b.

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

8c. No.  For simplicity, we again answer No to this question. We wait until later blogs in this series to explore this option.

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

9a. Yes. This is the second choice that is different in Example D.  As we explain below, our other constraints and our definition of “best” put us in a position where the parameters of the best yield curve are not unique without one more constraint.  We impose this constraint to obtain unique coefficients and then optimize the parameter used in this constraint to achieve “the best” yield curve.  We explore choice 9b in later blogs.

Now that all of these choices have been made, both the functional form of the line segments for forward rates and the parameters that are consistent with the data can be explicitly derived from our sample data.

Deriving the Form of the Yield Curve Implied by Example D

Our data set has observable yield data at maturities of 0, 0.25 years, 1, 3, 5 and 10 years.  For each segment of the yield curve, we have two constraints per segment (that the segment produces the market yields at the left side and right side of the segment). In addition to this, our imposition of the requirement that the full curve be differentiable means that there are other constraints. We have 6 knot points in total and 4 interior knot points (0.25, 1, 3, and 5) where we require the adjacent yield curve segments to produce the same first derivative of yields at a given knot point.  That means we have 14 constraints (not including the constraint in step 9), but a linear yield spline would only have 2 parameters per segment and 10 parameters in total.

That means that we need to step up to a functional form for each segment that has more parameters.  The following two links to Wikipedia articles nicely summarize the progression from linear to quadratic to cubic splines:

http://en.wikipedia.org/wiki/Spline_interpolation

http://en.wikipedia.org/wiki/Spline_%28mathematics%29

Our objective in these blogs is not to reproduce the intellectual history of splines, because it’s too voluminous, not to mention too hard.  Indeed, a google search yesterday on “quadratic splines” produced applications to automotive design (where much of the original work on splines was done), rocket science (really), engineering, computer graphics, and astronomy. Instead, we want to focus on the unique aspect of using splines and other smoothing techniques in finance, where both yields and related forwards are important.  The considerations for “best” in finance are dramatically different than they would for the designer of the hood for a new model of the Maserati.

In the current Example D, we are still defining the “best” yield curve as the one with the shortest possible length or maximum “tension.”  When we turn to cubic splines, we will discuss the proof that cubic splines produce the “smoothest” curve.  In this example, we will numerically force the quadratic splines we derive to be the shortest possible quadratic splines that are consistent with the constraints we’re imposing in our continuing search for greater financial realism.

We can derive the shortest possible quadratic spline implementation in two ways.  First, we could evaluate the function s given in Step 3, since for the first time the full yield curve will be continuously differentiable, even at the knot points. Alternatively, we can again measure the length the curve by approximating the curve with a series of line segments, thanks to Pythagoras, whom we invoked in Part 3 of this series:

We chose the latter approach for consistency with our earlier examples.  We break the 10 year yield curve into 120 monthly segments to numerically measure length.  We now derive the set of five quadratic spline coefficients that are consistent with the constraints we have imposed.

Each yield curve segment has the quadratic form

The subscript i refers to the segment number.  The segment from 0 to 0.25 years is segment 1, the segment from 0.25 years to 1 year is segment 2, and so on.  As mentioned above, we have 10 constraints that require the left hand side and the right hand of each segment to equal the actual yield at that maturity, which we call y*.  For the jth line segment, we have two constraints, one at the left hand side of the segment, where the years to maturity are tj, and one at the right hand side of the segment tj+1.

In addition we have four constraints at the interior knot points.  At each of these knot points, the first derivatives of the two segments that join at that point must be equal:

When we solve for the coefficients, we will rearrange these four constraints in this manner:

Our last constraint is imposed at the right hand side of the yield curve, time T=10 years.  We will discuss in later blogs the alternative specifications, but for now assume we want to constrain the first derivative of the yield curve at T=10 to take a specific value x:

In the equation above, j=5, the fifth line segment and T=10.  The most commonly used value for x is zero, the constraint that the yield curve be flat where T=10.  Our initial implementation will use x=0.

In matrix form, our constraints look like this:

Note that it is the last element of the “y Vector” matrix where we have set the constraint that the first derivative of the yield curve be zero at 10 years.  When we invert the coefficient matrix, we get the following result:

We solve for the following coefficient values:

These coefficients give us the five quadratic functions that make up the yield curve.  We use the fourth relationship below to derive the forward rate curve:

The forward rate function for any segment j is

We then plot the yield and forward rate curves to see whether or not our definition of “best yield curve” and the related constraints we imposed produced a realistic yield curve and forward rate curve:

The answer for Example D so far is mixed.  The yield curve itself fits the data perfectly, our standard “necessary” condition.  The yield curve is also reasonably smooth and looks quite plausible given where the observable yields (in black) are.  The bad news, as usual, relates to forward rates.  As in prior examples, it is much easier to spot flaws in the assumptions when looking at forward rates than it is when looking at yields alone.  This is one of the reasons why “best practice” in the financial application of splines is so different than it is in computer graphics or automotive design, where there is no equivalent of the forward rate curve.

The lack of realism in the forward rates can be summarized as follows:

• The forward curve segments do not have first derivatives that are equal at the knot points where the forward segments meet; the forward curve has serious “kinks” in it at the knot point
• The movements of the forward curve are “not smooth” by any definition

It’s possible that our 15th constraint, y’(10)=0, should be changed to some other value y’(10)=x.  We explore that below.  Before doing so, however, we overlay the yield and forward curves on the best fitting (but not perfectly fitting) Nelson-Siegel curve:

The graph makes two key points.  First of all, the Nelson-Siegel curves are simply wrong and do not pass through the actual data points (in black).  We know that already.  Why, then, does anyone use Nelson-Siegel?  For some, the smoothness of the forward curves is so seductive that the fact that valuation using the curve is wrong seems not to concern these analysts.  It is unacceptable to us, but the smoothness of the forward rate curves in the Nelson-Siegel approach shows us “what the market wants.”

We clearly need to do better than a quadratic yield spline to get the smooth forward rates that we want.  Let’s first ask the question “Can we improve the quadratic spline approach by optimizing the value of x in the 15th constraint, y’(10)=x?” This insight comes from a working paper by Tibor Janosi and Robert A. Jarrow in 2002, who noted that this constraint and others like it could have important implications for the “best” curve.  Our first implementation was x=0, a flat yield curve on the long end of the curve. We now look at alternative values for x.

There are two criteria for “best” that we could use given our statement above that the “best” curve is the one that is the shortest, the one with maximum tension.  We could choose the value of x that produces the shortest yield curve or the value of x that produces the shortest forward rate curve.  We do both.

If we use common spreadsheet software and iterate x so that the length (calculated numerically at 120 monthly intervals) of the yield curve is minimized, we get this set of coefficients:

If we iterate x so that the length of the forward rate curve is minimized, we get still another set of coefficients:

The value of x that produces the shortest yield curve is 0.00640.  The value of x that produces the shortest forward rate curve is 0.00364.  We can compare these three variations on the yield curve produced by the quadratic spline approach:

Our “base case” is plotted in red, and the flatness of the yield curve on the right hand side of the curve is readily apparent.  Relaxing that constraint to produce the shortest yield curve produces the curve in orange, where the yield curve is rising sharply at the 10 year point.  The shortest forward rate curve produces the yield curve in blue.  When we look at forward rates associated with these yield curves, we get the following view:

The forward curve with the shortest length, consistent with a quadratic spline of yields, is shown in blue.  It is dramatically better than the two alternatives, but it’s obvious that it can be made better in two dimensions:

• The forward curve is rising too rapidly to be realistic at the 10 year point
• The kinks in the forward curve at the knot points are not realistic

The table below summarizes the analytical choices we have made in this and other examples and compares the lengths of the forward and yield curves using our discrete monthly numerical approximation:

By optimizing x in our 15th constraint, we reduced the length of the forward rate curve from 20.48 to 17.21.  When we optimized x to minimize the length of the yield curve, we were able to get the length of the yield curve down to 11.46, only slightly more than Nelson-Siegel (10.23, but it is inconsistent with the data) and linear yield curve smoothing (10.99, but with discontinuous forward rates and kinks in the yield curve). We’re making progress.

In part 7 of this blog, we apply the quadratic splines to the forward curve directly to see if that will achieve the desired realism.

Donald R. van Deventer
Kamakura Corporation
Honolulu, December 3, 2009

ABOUT THE AUTHOR

Donald R. Van Deventer, Ph.D.

Don founded Kamakura Corporation in April 1990 and currently serves as Co-Chair, Center for Applied Quantitative Finance, Risk Research and Quantitative Solutions at SAS. Don’s focus at SAS is quantitative finance, credit risk, asset and liability management, and portfolio management for the most sophisticated financial services firms in the world.

Read More