• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Yield curve non parallel shifts - spline

Joy Pathak

Swaptionz
Joined
8/20/09
Messages
1,330
Points
73
bob

Hey bob.. what could be some issues when you do non parallel shifts on a curve that is built using cubic spline interpolation or any spline interpolation.
 
A shift at a single point will affect the entire curve because of the constraint of continuous derivatives. So you can't really have an isolated shock of one part of the curve.
 
A shift at a single point will affect the entire curve because of the constraint of continuous derivatives. So you can't really have an isolated shock of one part of the curve.

Shifts are along the whole curve, but it's non-parallel.
 
If you could express the shift as a polynomial of the same degree as the spline, then just add the shift to each segment and there are no issues.
 
I suppose even if the shift is non-polynomial, you could still add it to the segments if it has a continuous second derivative. You would still have a smooth, though not polynomial, spline.
 
bob

Hey bob.. what could be some issues when you do non parallel shifts on a curve that is built using cubic spline interpolation or any spline interpolation.
Hey Joy,
I'm certainly not an expert in curve-stripping or splines. If you're interested in reading someone who is, you might check out this post by Donald van Deventer and others from the same series on his blog:

http://www.kamakuraco.com/Blog/tabi...-and-Related-Yields-versus-Nelson-Siegel.aspx

The punchline is basically that some version of a quartic spline in the forward rates is the most desirable method from the standpoint of forward-rate smoothness. Much more detail on the subject is available in his blog.

Although I've known this result for a while, I'd never gotten around to actually trying it out. But your question made me curious, so I worked my way through it and played around with this scheme in comparison with the straightforward cubic spline in spot rates.

I should add the disclaimer that this was all done from formulas I was working out after midnight last night at the end of a long week, so it's quite possible that this implementation doesn't fairly represent the method, although what I wound up with passes the smell test and appears, at least, to be working as intended.

The problem is, as has been noted previously in the thread, that shifts at one point tend to propagate across the curve and may lead to some unpredictable or counterintuitive results. The fact that you're shocking more than one point doesn't change that; from my perspective, it just makes the possible oddities even more difficult to predict.

The base curve is made up: Rates are very low at the short end and basically flat for some of it, then slope up to longer maturities. (My little toy case here only goes out to 5 years.) As I said, this isn't a real curve but bears some resemblances to what you might find now for USD. I shocked the thing in a way that is also, qualitatively, a realistic possibility: a twist where short-term rates increase a little, 2- and 5-year rates decrease, with a very small amount of steepening from 2 to 5.

I was interested in seeing what would happen to 3M forward rates between 2 and 5 years as a result. These are things you'd be interested in for the purposes of pricing rate caps, for example. The results are attached, showing pre- and post-shock curves for both methods, along with the term structure of 3M forward rates.

The forward from 2 to 5 increased very little as a result of the shock--only about 3bp all told. But as you can see, how the forward term structure gets redistributed as a consequence is quite dramatic in the cubic case. It's also not, to me anyway, obvious that this should happen, since it appears just by inspection that the post-shock curve is in both cases actually much less strongly kinked than the original was. There are differences of plus or minus 20bp or more at either end in the cubic case.

In other words, smooth as a cubic curve may look to the eye, the continuity constraints actually impose a good deal more rigidity in what you're modeling than is really obvious, and the fact that those constraints operate on the spot rates may make the method unsuitable when you care a lot about the forwards. Pricing a 3Y cap, for example, under this method would return something quite different in these two cases, and the scale of the change in value may not be at all what you'd expect under a shock like the one described, especially given the relatively small apparent change in rates.

It certainly does seem that the quartic forward method does a better job of handling the shock. It still twists the forward rates in the 2Y-5Y interval, but the effect is not nearly as dramatic.

Obviously this is just one case, so it's hardly a complete or formal response to your question. In the end the choice of method needs to be dictated by the purpose you have in mind; there's no "right" answer per se. However, it does seem that if you're going to go with a spline method, the quartic forward method performs pretty much as advertised.
 

Attachments

  • spline comparisons.pdf
    32.9 KB · Views: 53
Hey Bob,

You said in class that you might fit a spline without constraining it to perfectly match market prices, e.g. using least-squares. Does that make any difference? How would you go about shocking this curve? Do you just move the knots and fit a spline to intersect them all, or would you add more points along the curve and minimize the error again?
 
Typically you would do an error-minimization procedure only to generate the base curve. You then price or do risk on other instruments as if that is the one and only rate curve. It may seem a little contradictory, but of course you have to acknowledge that the curve is an idealization that makes pricing possible, rather than a complete description of reality. Likewise, prices themselves are noisy and so the data from which the curve is taken constitute point estimates of the perceived values of the instruments involved.

Of course, the fact that instruments' prices are not completely determined by your curve is a source of risk, and as such could potentially be a source of profit. While in many cases a dramatic outlier has a reason for being an outlier, when deviations are moderate it may simply be a consequence of the fact that, in the absence of the lightspeed trading that has taken over in equity and futures markets, fixed income markets move at a far more stately pace.
 
So the error minimization essentially aggregates the market data into a base term structure defined by one rate at each knot. Then this curve is used for normal spline interpolation. Thanks for clearing that up.
 
Hey Joy,
I'm certainly not an expert in curve-stripping or splines. If you're interested in reading someone who is, you might check out this post by Donald van Deventer and others from the same series on his blog:

http://www.kamakuraco.com/Blog/tabi...-and-Related-Yields-versus-Nelson-Siegel.aspx

The punchline is basically that some version of a quartic spline in the forward rates is the most desirable method from the standpoint of forward-rate smoothness. Much more detail on the subject is available in his blog.

Although I've known this result for a while, I'd never gotten around to actually trying it out. But your question made me curious, so I worked my way through it and played around with this scheme in comparison with the straightforward cubic spline in spot rates.

I should add the disclaimer that this was all done from formulas I was working out after midnight last night at the end of a long week, so it's quite possible that this implementation doesn't fairly represent the method, although what I wound up with passes the smell test and appears, at least, to be working as intended.

The problem is, as has been noted previously in the thread, that shifts at one point tend to propagate across the curve and may lead to some unpredictable or counterintuitive results. The fact that you're shocking more than one point doesn't change that; from my perspective, it just makes the possible oddities even more difficult to predict.

The base curve is made up: Rates are very low at the short end and basically flat for some of it, then slope up to longer maturities. (My little toy case here only goes out to 5 years.) As I said, this isn't a real curve but bears some resemblances to what you might find now for USD. I shocked the thing in a way that is also, qualitatively, a realistic possibility: a twist where short-term rates increase a little, 2- and 5-year rates decrease, with a very small amount of steepening from 2 to 5.

I was interested in seeing what would happen to 3M forward rates between 2 and 5 years as a result. These are things you'd be interested in for the purposes of pricing rate caps, for example. The results are attached, showing pre- and post-shock curves for both methods, along with the term structure of 3M forward rates.

The forward from 2 to 5 increased very little as a result of the shock--only about 3bp all told. But as you can see, how the forward term structure gets redistributed as a consequence is quite dramatic in the cubic case. It's also not, to me anyway, obvious that this should happen, since it appears just by inspection that the post-shock curve is in both cases actually much less strongly kinked than the original was. There are differences of plus or minus 20bp or more at either end in the cubic case.

In other words, smooth as a cubic curve may look to the eye, the continuity constraints actually impose a good deal more rigidity in what you're modeling than is really obvious, and the fact that those constraints operate on the spot rates may make the method unsuitable when you care a lot about the forwards. Pricing a 3Y cap, for example, under this method would return something quite different in these two cases, and the scale of the change in value may not be at all what you'd expect under a shock like the one described, especially given the relatively small apparent change in rates.

It certainly does seem that the quartic forward method does a better job of handling the shock. It still twists the forward rates in the 2Y-5Y interval, but the effect is not nearly as dramatic.

Obviously this is just one case, so it's hardly a complete or formal response to your question. In the end the choice of method needs to be dictated by the purpose you have in mind; there's no "right" answer per se. However, it does seem that if you're going to go with a spline method, the quartic forward method performs pretty much as advertised.

Thanks for the detailed reply Bob. So I basically have the same problem that your images showed in the file. I am using 6 prices from Futures at the short end... and then the 5 yr 7yr and 10yr swap rates to build the curve. I apply non-parallel shocks to all the future prices and the swaps using to simulate a 3 day flattener move from history.

Around the 4-5yr there is a massive kink like in the one you have in the pics but much more exagerated. I have tried adding more quotes from OIS and fed funds rates to smooth it out but nothing works. Everytime I shock it the kink comes back and the more quotes I use at the short end the worse it gets.

Any idea on how I get rid of it?
 
Ah, so you're shocking the underlying data rather than the discount factors? I don't know what software you're using to perform the calculations--whether canned or homemade--but of course if you're shocking par rates then you have to re-bootstrap, and if you're using a spline interpolation then you have to do it across the entire curve. I assume this is what you're doing. Obviously you also want to make sure you're working with convexity-adjusted rates from the Eurodollar futures, although this is a very small difference for the maturities that are typically used for curve stripping.

The kink in that area is a real feature, I'm afraid. You may be able to get LIBOR FRA quotes; Reuters offers them, I know. It may be at least worth a try to build a pure LIBOR curve--i.e., spot fixings, FRA's, and swaps--to see if the oddities are less pronounced. I haven't done this myself, so it's really just an idea, and generally speaking FRA's are not preferred because they are less liquid than the futures. But you may find that the rates there provide better agreement with the surrounding rates.
 
I am shocking the price for the futures and yields for the swap rates. That's just how the software (homemade) does it.

There are simulated FRA's used in the 30-60 yr range.

The idea is to stress and re-price the swaptions portfolio. I will try to use FRA's all through, although I don't see it working. I think not shocking all throughout is causing the problem. It's getting pushed up at the short end in the 1-2 yr range which is popping up the 5 yr area causing the kink. Let's see what works.
 
Back
Top