Interpolation, Part 2: Extrapolation#

Interpolation fills in between data. Extrapolation extends beyond the first and last data point, where there is nothing to check the answer against. A 50-year cash flow, an option with a strike far from the money, and an expiry past the longest quote all sit in the extrapolated region, and their values are set by the rule that is used. This page sets out the main rules for curves, volatilities and expiries, with the formula for each, and shows how far apart they are. It is the second of three pages on interpolation.

The problem#

Let \(x_n\) be the last node, with value \(y_n\). An extrapolation is a rule for \(f(x)\), \(x > x_n\). A good rule has four properties, and no rule has all of them:

  • Continuity. It joins the interpolant at \(x_n\), and ideally with the same slope.

  • Stability. It does not blow up: a cubic polynomial continued far from the data grows like \(x^3\).

  • Economic sense. A discount factor stays positive and falls, a forward rate stays near a long-run level, a volatility stays positive, and a density stays positive.

  • Insensitivity. A small change in the last data point does not move the far end by much.

General rules#

Flat (constant). Hold the last value,

\[f(x) = y_n \quad (x > x_n)\]

It is stable and simple. What is held flat matters: a flat zero rate, a flat forward rate, a flat volatility and a flat total variance are four different curves.

Linear. Continue the last slope \(s\),

\[f(x) = y_n + s\,(x - x_n)\]

The slope is taken from the last segment, or from the end slope of a spline. It continues the trend, and it grows without a bound, so a rate can turn negative or a volatility can grow without limit if the distance is long.

Polynomial continuation. Evaluate the last cubic piece of a spline beyond \(x_n\). The cubic term then dominates and the value diverges. A natural spline has zero second derivative at \(x_n\), and its third derivative is not zero, so it is not linear beyond. It is almost never the right choice.

Curves#

Beyond the last pillar \(t_n\) the discount factor has to be defined for every maturity. With the last zero rate \(z_n\) and the last forward rate \(f_n\) (the log-linear forward between the last two pillars):

Extrapolation of a discount curve#

Rule

Discount factor for \(t > t_n\)

Zero rate and forward rate

Flat zero rate

\(D(t) = e^{-z_n t}\)

\(z(t) = z_n\). The forward rate jumps from \(f_n\) to \(z_n\) at \(t_n\)

Flat forward rate (log-linear)

\(D(t) = D(t_n)\,e^{-f_n (t - t_n)}\)

\(f(t) = f_n\). The zero rate moves towards \(f_n\)

Linear zero rate

\(D(t) = \exp\big( -[z_n + s\,(t - t_n)]\,t \big)\)

Forward \(f(t) = z(t) + t\,s\), which falls (or rises) twice as fast as the zero

Smith-Wilson

\(D(t) = e^{-\omega t} + \sum_j \zeta_j\,W(t, t_j)\)

The forward rate converges to the ultimate forward rate \(\omega\) at a speed \(\alpha\)

Smith-Wilson is the method that the European insurance regulator prescribes for the long end of the curve, where there are no liquid instruments. It chooses an ultimate forward rate (UFR) \(\omega\) as an input, and builds the discount curve as a decaying sum around \(e^{-\omega t}\). The kernel is

\[W(t, u) = e^{-\omega (t + u)} \left[ \alpha \min(t, u) - e^{-\alpha \max(t, u)} \sinh\big( \alpha \min(t, u) \big) \right]\]

and the weights \(\zeta\) are the solution of a linear system that makes the curve match the market prices \(P(t_j)\) at every pillar, \(W \zeta = P - e^{-\omega t_j}\). The curve is exact at the pillars and its forward rate tends to \(\omega\) beyond them, at a speed \(\alpha\) that is chosen, or calibrated so that the forward rate is within a tolerance of \(\omega\) after a stated number of years. The UFR is an assumption about the long run, and the value of a long liability depends on it.

Parametric curves such as Nelson-Siegel extrapolate as a by-product: the zero rate tends to the long-run parameter \(\beta_0\). That is the same idea with the long-run level estimated from the data.

Volatility surfaces#

Strike direction. Beyond the last quoted strike, the usual rules are a flat volatility, a linear continuation of the end slope, or a parametric wing. There is a hard constraint. Roger Lee’s moment formula shows that, for any arbitrage-free surface, the total variance \(w(k)\) as a function of the log-moneyness \(k\) grows no faster than \(2|k|\) in the wings:

\[\limsup_{|k| \to \infty} \frac{w(k)}{|k|} \le 2\]

A linear continuation of volatility in the strike eventually breaks it, and a polynomial does at once. A flat volatility satisfies it, and can still make the implied density negative at the junction if the slope of the volatility changes sign there. The density of the extended smile is \(\partial^2 C / \partial K^2\), which has to be non-negative.

Expiry direction. Beyond the longest expiry \(T_n\), a flat volatility continues \(\sigma(T) = \sigma_n\), so total variance grows in proportion to time. A flat total variance holds \(w = \sigma_n^2 T_n\), so the volatility falls as \(1/\sqrt{T}\) and the option stops gaining value as the expiry grows, which breaks the economic sense of a longer option and is the lower limit of the calendar condition. A linear total variance continues the last slope of \(w\).

Worked example#

The example extends the 30-year curve of Interpolation, Part 3: Curves & Surfaces to 100 years by seven rules, including the cubic continuation of three interpolants and Smith-Wilson with a UFR of 4.2% and \(\alpha = 0.1\). It extends a normal volatility smile quoted from -200bp to +200bp out to 800bp, and checks the implied density. And it extends a volatility from the longest quoted expiry of 10 years to 30 years.

Python code
"""Extrapolation beyond the last data point: curves (flat zero, flat forward, linear, spline, Smith-Wilson), volatility wings and expiries."""
import numpy as np
from scipy.interpolate import CubicSpline, PchipInterpolator
from scipy.stats import norm

from common import bs_price
from interpolation_example import PILLARS, ZERO

UFR, ALPHA = 0.042, 0.10  # ultimate forward rate and speed of convergence for Smith-Wilson


def bachelier_call(forward, strike, vol, expiry):
    """Call price for a normal volatility, with no discounting."""
    sd = vol * np.sqrt(expiry)
    d = (forward - strike) / sd
    return (forward - strike) * norm.cdf(d) + sd * norm.pdf(d)


def smith_wilson(pillars, zero, ufr=UFR, alpha=ALPHA):
    """Discount factor function P(t) = exp(-ufr t) + sum_j zeta_j W(t, u_j), exact at the pillars."""
    def wilson(t, u):
        t, u = np.asarray(t, float)[..., None], np.asarray(u, float)[None, :]
        lo, hi = np.minimum(t, u), np.maximum(t, u)
        return np.exp(-ufr * (t + u)) * (alpha * lo - np.exp(-alpha * hi) * np.sinh(alpha * lo))

    prices = np.exp(-zero * pillars)
    zeta = np.linalg.solve(wilson(pillars, pillars), prices - np.exp(-ufr * pillars))
    return lambda t: np.exp(-ufr * np.asarray(t, float)) + wilson(t, pillars) @ zeta


def forward_of(df, t, h=1e-3):
    return -(np.log(df(t + h)) - np.log(df(t - h))) / (2 * h)


if __name__ == "__main__":
    last, t_last = ZERO[-1], PILLARS[-1]
    fwd_last = -(np.log(np.exp(-ZERO[-1] * PILLARS[-1])) - np.log(np.exp(-ZERO[-2] * PILLARS[-2]))) / (PILLARS[-1] - PILLARS[-2])
    slope_last = (ZERO[-1] - ZERO[-2]) / (PILLARS[-1] - PILLARS[-2])
    spline = CubicSpline(PILLARS, ZERO, bc_type="natural")
    nak = CubicSpline(PILLARS, ZERO)
    pchip = PchipInterpolator(PILLARS, ZERO)
    sw = smith_wilson(PILLARS, ZERO)

    curves = {
        "Flat zero rate": lambda t: np.exp(-last * np.asarray(t, float)),
        "Flat forward rate (log-linear)": lambda t: np.exp(-last * t_last - fwd_last * (np.asarray(t, float) - t_last)),
        "Linear zero rate, last slope": lambda t: np.exp(-(last + slope_last * (np.asarray(t, float) - t_last)) * np.asarray(t, float)),
        "Natural spline, polynomial continued": lambda t: np.exp(-spline(t) * np.asarray(t, float)),
        "Natural spline, end slope continued": lambda t: np.exp(-(last + spline(t_last, 1) * (np.asarray(t, float) - t_last)) * np.asarray(t, float)),
        "Not-a-knot spline, polynomial continued": lambda t: np.exp(-nak(t) * np.asarray(t, float)),
        "PCHIP, polynomial continued": lambda t: np.exp(-pchip(t) * np.asarray(t, float)),
        f"Smith-Wilson, UFR {UFR:.1%}, alpha {ALPHA}": sw,
    }
    print(f"Last pillar {t_last:.0f} years: zero rate {last:.2%}, last forward {fwd_last:.2%}, last slope of the zero curve {slope_last * 1e4:.1f}bp a year\n")
    print("Zero rate (%) beyond the last pillar")
    print(f"{'Method':<42} " + " ".join(f"{t:>7}y" for t in (30, 40, 60, 100)))
    for name, df in curves.items():
        print(f"{name:<42} " + " ".join(f"{-np.log(df(np.array([t])))[0] / t * 100:8.2f}" for t in (30, 40, 60, 100)))
    print("\nForward rate (%) beyond the last pillar")
    print(f"{'Method':<42} " + " ".join(f"{t:>7}y" for t in (35, 50, 80)))
    for name, df in curves.items():
        print(f"{name:<42} " + " ".join(f"{forward_of(df, np.array([t]))[0] * 100:8.2f}" for t in (35, 50, 80)))
    print("\nValue today of 100m paid at 60 years")
    for name, df in curves.items():
        print(f"{name:<42} {100e6 * df(np.array([60.0]))[0]:12,.0f}")

    # Volatility wings: normal volatility quoted from -200bp to +200bp, extended to +-800bp.
    offsets = np.array([-200, -100, -50, 0, 50, 100, 200.0]) / 1e4
    vols = np.array([112, 100, 93, 88, 86.5, 87, 92.0]) / 1e4
    smile = CubicSpline(offsets, vols, bc_type="natural")
    slope_hi, slope_lo = smile(offsets[-1], 1), smile(offsets[0], 1)

    def wing_vol(k, kind):
        k = np.asarray(k, float)
        inside = np.clip(k, offsets[0], offsets[-1])
        if kind == "flat":
            return smile(inside)
        if kind == "linear":
            return smile(inside) + slope_hi * np.maximum(k - offsets[-1], 0) + slope_lo * np.minimum(k - offsets[0], 0)
        return smile(k)

    expiry = 5.0
    grid = np.linspace(-0.08, 0.08, 3201)
    print(f"\nVolatility wings (normal vol, {expiry:.0f} years, quoted to +-200bp). Option density = second derivative of the call price in the strike")
    print(f"{'Extrapolation':<30} {'Vol +400bp':>11} {'Vol +800bp':>11} {'Lowest, inside':>15} {'Lowest, wings':>14} {'Negative mass':>14}")
    dk = grid[1] - grid[0]
    for kind, label in (("flat", "Flat volatility"), ("linear", "End slope continued"), ("natural", "Spline polynomial continued")):
        v = wing_vol(grid, kind)
        price = np.array([bachelier_call(0.0, k, vol, expiry) for k, vol in zip(grid, v)])
        density = np.gradient(np.gradient(price, grid), grid)
        inside = np.abs(grid) < 0.0195
        wings = np.abs(grid) > 0.0205
        mass = np.sum(np.minimum(density, 0.0)) * dk
        print(f"{label:<30} {wing_vol(0.04, kind) * 1e4:9.1f}bp {wing_vol(0.08, kind) * 1e4:9.1f}bp {density[inside].min():15.3f} {density[wings].min():14.3f} {mass:14.4f}")

    # Expiries: 25%, 22%, 20% and 19% quoted at 1, 2, 5 and 10 years, extended to 30 years.
    times, quoted = np.array([1, 2, 5, 10.0]), np.array([0.25, 0.22, 0.20, 0.19])
    print("\nAt-the-money option on a forward of 100 (rate 0), vol extended beyond the 10 year quote")
    print(f"{'Method':<44} {'Vol at 30y':>11} {'Price at 30y':>13} {'Total variance at 30y':>22}")
    for label, vol30 in (("Flat volatility", 0.19), ("Flat total variance (vol falls as 1/sqrt(T))", 0.19 * np.sqrt(10 / 30)),
                         ("Linear in total variance, last slope", np.sqrt((0.19**2 * 10 + (0.19**2 * 10 - 0.20**2 * 5) / 5 * 20) / 30))):
        print(f"{label:<44} {vol30:11.2%} {bs_price(100, 100, 0.0, vol30, 30.0):13.3f} {vol30**2 * 30:22.4f}")

The output is:

Last pillar 30 years: zero rate 4.30%, last forward 4.10%, last slope of the zero curve -1.0bp a year

Zero rate (%) beyond the last pillar
Method                                          30y      40y      60y     100y
Flat zero rate                                 4.30     4.30     4.30     4.30
Flat forward rate (log-linear)                 4.30     4.25     4.20     4.16
Linear zero rate, last slope                   4.30     4.20     4.00     3.60
Natural spline, polynomial continued           4.30     4.20     5.27    21.33
Natural spline, end slope continued            4.30     4.15     3.84     3.23
Not-a-knot spline, polynomial continued        4.30     5.29    17.74   134.70
PCHIP, polynomial continued                    4.30     3.60    -2.00   -46.80
Smith-Wilson, UFR 4.2%, alpha 0.1              4.30     4.24     4.22     4.21

Forward rate (%) beyond the last pillar
Method                                          35y      50y      80y
Flat zero rate                                 4.30     4.30     4.30
Flat forward rate (log-linear)                 4.10     4.10     4.10
Linear zero rate, last slope                   3.90     3.60     3.00
Natural spline, polynomial continued           3.83     6.82    40.58
Natural spline, end slope continued            3.69     3.23     2.31
Not-a-knot spline, polynomial continued        7.77    38.81   280.45
PCHIP, polynomial continued                    1.70   -11.80  -103.60
Smith-Wilson, UFR 4.2%, alpha 0.1              4.08     4.17     4.20

Value today of 100m paid at 60 years
Flat zero rate                                7,577,400
Flat forward rate (log-linear)                8,045,961
Linear zero rate, last slope                  9,071,795
Natural spline, polynomial continued          4,242,315
Natural spline, end slope continued           9,975,956
Not-a-knot spline, polynomial continued           2,379
PCHIP, polynomial continued                 332,011,692
Smith-Wilson, UFR 4.2%, alpha 0.1             7,952,379

Volatility wings (normal vol, 5 years, quoted to +-200bp). Option density = second derivative of the call price in the strike
Extrapolation                   Vol +400bp  Vol +800bp  Lowest, inside  Lowest, wings  Negative mass
Flat volatility                     92.0bp      92.0bp           7.476          0.005        -0.1032
End slope continued                104.3bp     129.0bp           7.476          0.057         0.0000
Spline polynomial continued         95.0bp    -123.4bp           7.476   -6705000.000      -670.2640

At-the-money option on a forward of 100 (rate 0), vol extended beyond the 10 year quote
Method                                        Vol at 30y  Price at 30y  Total variance at 30y
Flat volatility                                   19.00%        39.717                 1.0830
Flat total variance (vol falls as 1/sqrt(T))      10.97%        23.614                 0.3610
Linear in total variance, last slope              18.30%        38.380                 1.0050
Zero rates and forward rates from 30 to 100 years for five extrapolation rules, with Smith-Wilson converging to the ultimate forward rate

Reading the output:

  • The cubic continuations are unusable. The not-a-knot spline gives a zero rate of 134.7% at 100 years, the natural spline 21.3%, and PCHIP -46.8%. A payment at 60 years is worth 2,379 on the first, and 332 million on the last, for a payment of 100 million. A cubic term that was harmless between the pillars dominates beyond them.

  • The sensible rules agree at 40 years and diverge after. A 100 million payment at 60 years is worth 7.58 million with a flat zero rate, 8.05 million with a flat forward rate, 7.95 million with Smith-Wilson and 9.07 million with a linear zero rate. The range is 1.5 million, which is about 20% of the value, for the same market data.

  • Flat zero and flat forward differ at the join. The last forward rate is 4.10% and the last zero rate 4.30%. Holding the zero rate flat makes the forward rate jump up to 4.30% at 30 years. Holding the forward rate flat makes it 4.10% for ever, and pulls the zero rate down to 4.16% at 100 years.

  • Linear rules keep falling. The last slope of the zero curve, -1bp a year, gives a forward rate of 3.00% at 80 years and 2.31% with the end slope of the spline. A trend in the last two pillars becomes a long-run view of the interest rate.

  • Smith-Wilson converges to the assumption. The forward rate rises from 4.08% at 35 years to 4.17% at 50 and 4.20% at 80, towards the UFR of 4.2%, and the zero rate stays between 4.21% and 4.24%. The long end is then the UFR that was chosen, and its value is a regulator’s or an actuary’s assumption, and not a market observation.

  • Volatility wings: flat is not free. A flat extension has a negative probability mass of -0.103 from the kink where the slope of the volatility changes from positive to zero. Continuing the end slope joins smoothly and has none, and the volatility grows to 129bp at +800bp. The spline polynomial continued has a volatility of -123bp at +800bp and a density of -6.7 million.

  • Expiry: the three rules give prices from 23.6 to 39.7. A flat volatility gives 39.7, the linear total variance 38.4, and a flat total variance, which makes the volatility fall to 11.0%, gives 23.6. The last stops the option gaining value as it gets longer, which is the extreme of the calendar condition.

A valuation control view#

  • Record the extrapolation for every curve and surface: the rule, where it starts, and its parameters, such as the UFR and the speed. It is part of the model and is often missing from the documentation.

  • Plot the extrapolated region: the zero rate, the forward rate and the discount factor out to the longest maturity that is in the books. A cubic term, a negative forward rate or a jump at the join is visible at a glance.

  • Measure the value that rests on the extrapolation: the share of the book, and of the value and the risk, beyond the last liquid quote. A pension swap at 50 years may be almost entirely extrapolation.

  • Compare at least two defensible rules: the 20% difference above is an estimate of the model uncertainty for a long-dated payment, and a candidate for a reserve. See Prudent Valuation: Requirements.

  • Treat the long-run assumption as an input to be reviewed: the UFR, or the flat volatility beyond the last quote, is a judgement and not data. Who set it, when, and what a change of 25 basis points does to the book are questions a controller should ask.

  • Check the level: a value that is mostly extrapolated rests on an unobservable input, which bears on the fair value hierarchy. See Fair-Value Hierarchy: Levels 1, 2 & 3.

  • Test for arbitrage in the extended surface: the density in the strike direction and the calendar condition in the expiry direction, beyond the last quote as well as inside it.

Next, Interpolation, Part 3: Curves & Surfaces applies interpolation to the curve and the surface.