Skip to content
All library documents

Why Cubic Splines Fail When Extrapolating Spot Rates

Article Quant Q&A · Author: Fidelio

Summary

The document explains why a bond’s implied spot rate can differ from a rate curve built with a SciPy univariate spline. The bond has two remaining cash flows, and its price and yield-to-maturity equation imply a final-cash-flow spot rate of about 2.8%, while the observed curve points are around 3%. The key issue is that the requested maturity lies beyond the spline’s input range, so the result is extrapolation rather than interpolation.

A cubic spline has little basis for predicting beyond the observed tenors and can grow rapidly outside them. For a more plausible long-end estimate, the answers suggest adding market observations that cover the target maturity, holding a related credit spread constant over an underlying swap curve, or extending the last observable forward rate as constant. Nelson–Siegel is mentioned but not considered useful for this particular case. These are modeling suggestions, not a comparison backed by broader empirical tests; extrapolated rates remain assumption-sensitive.

Key ideas

  • The target maturity is outside the supplied data range, so the spline is extrapolating rather than interpolating.
  • Cubic spline extrapolation can produce implausible rates because the curve is unconstrained beyond observed points.
  • More market data covering the target tenor can reduce reliance on extrapolation.
  • Possible long-end assumptions include a constant spread over a related curve or a constant terminal forward rate.

Tags

Full text
# Scipy Interpolation not good for fitting spot rates?


# Scipy Interpolation not good for fitting spot rates?












Trying to calculate a simple spot rate of a bond that has 2 cashflows left.

Maturity: 2025-05-15 Cashflows: $0.725$ coupon on 15-11-2024, then final on maturity

Dirty price is $99.703$

If I calculate YTM the usual way, it ties up:

$99.70 = \dfrac{0.725}{1.028061^{0.129}} + \dfrac{100.725}{1.028061^{0.625}}$

And, when I calculate the spot price of the last cashflow, I get $0.0283406$. This, as per below, ties up with the price:

$99.70 = \dfrac{0.725}{1.028061^{0.129}} + \dfrac{100.725}{1.028061^{0.625}}$

But how can this value ($0.028$) be so different from my spot curve, which is coming from the univariate spline from the 4 points below?

```
0    Ttm      Spot
1  0.129  0.032197
2  0.173  0.031714
4  0.342  0.030348
5  0.419  0.030995
```

Interpolation with in `scipy.interpolate` univariate interpolation

## Answer by Luigi Ballabio (score 4)

https://quant.stackexchange.com/a/80745

You're not interpolating, you're extrapolating. That is, you're creating the spline with data from $t=0.129$ to $0.419$ and then you're asking it for values outside that range. It doesn't really have that information. Splines are especially bad for that, because you'll extrapolate with a cubic and it will become very large quickly. Plot your rates until $t=2$ or $3$ to see what I mean.

If you want to have reasonable results for your home, you need more input data to cover that range.

## Answer by Dimitri Vulis (score 3)

https://quant.stackexchange.com/a/80748

In general, using splines to interpolate or extrapolate yield curves is tricky and easily leads to "hallucinations". People do use splines, but they require tweaking / constraining to make economic sense.

When trying to extrapolate, you might be better of with one of the following:

If the yield curve of some related risky bonds is actually a spread over a riskless/swap curve, and you have more data for the swap curve, then assume that the spread stays constant beyond your last observation. See Interpolating a yield from two yields (giving more weight to one of the two) for more detailed discussion.

If this isn't a spread over an underlying swap curve, then you could get the forward rate from the end of the yield curve that is observable, and extrapolate assuming the forward rate to be constant at longer tenors.

We should also mention Nelson Siegel, although it's not helpful here.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.