Qm
Core

Polynomial Interpolation

Fitting a single polynomial that passes exactly through a set of known points, the standard way to fill in a smooth curve between quoted market points, like building a full yield curve from a handful of benchmark rates.

Prerequisites: Taylor Series Expansion

A trading desk observes market rates at only a handful of maturities, say 1, 5, and 10 years, but needs a rate for every maturity in between, like 3 years, to price an odd-dated instrument. There's no market quote for exactly 3 years, so the rate has to be interpolated: constructed from the known points in a way that's smooth and internally consistent. Polynomial interpolation is the most basic tool for this: find the (essentially unique) polynomial curve that passes exactly through every known point, and read off its value anywhere in between.

An analogy: connecting dots with the smoothest possible curve

Think of connecting a handful of dots on a page not with straight lines (which would have visible sharp corners at each dot) but with a single smooth, wavy curve that threads through every dot exactly. With enough dots, a sufficiently flexible curve can be drawn through all of them, that curve, if it's a polynomial, is unique for a given set of dots: there is exactly one polynomial of the right degree that passes through nn points and no other of that degree does.

The math, one piece at a time

Given n+1n+1 known data points (x0,y0),,(xn,yn)(x_0, y_0), \ldots, (x_n, y_n) with distinct xx-values, there exists exactly one polynomial of degree at most nn that passes through every point exactly. Lagrange's form writes this polynomial explicitly:

P(x)=i=0nyiLi(x),Li(x)=jixxjxixj.P(x) = \sum_{i=0}^{n} y_i \, L_i(x), \qquad L_i(x) = \prod_{j \neq i} \frac{x - x_j}{x_i - x_j} .

In words: P(x)P(x) is a weighted sum of the known yy-values, where each weight Li(x)L_i(x) is a specially constructed function that equals exactly 1 at its own point xix_i and exactly 0 at every other known point xjx_j, so at any known point, only that point's term survives and PP reproduces the correct yy-value exactly, while in between, all the weights blend smoothly to interpolate. The construction of Li(x)L_i(x) guarantees this: the product runs over every other point jj, and each factor xxjxixj\frac{x-x_j}{x_i-x_j} is built to vanish at x=xjx=x_j and equal 1 at x=xix=x_i.

The catch is that with more points, the interpolating polynomial's degree rises, and high-degree polynomials tend to swing wildly between the known points, a phenomenon called Runge's phenomenon, especially near the edges of the data range, even though the curve is forced to pass exactly through every point. More data doesn't always mean a better-behaved curve.

Worked example 1: interpolating a rate by hand

Given 1-year rate 3.0%, 5-year rate 4.0%, and 10-year rate 4.5%, three points, so a degree-2 (quadratic) polynomial fits exactly. Using Lagrange's formula to estimate the 3-year rate (x=3x=3):

L0(3)=(35)(310)(15)(110)=(2)(7)(4)(9)=14360.389,L_0(3) = \frac{(3-5)(3-10)}{(1-5)(1-10)} = \frac{(-2)(-7)}{(-4)(-9)} = \frac{14}{36} \approx 0.389, L1(3)=(31)(310)(51)(510)=(2)(7)(4)(5)=1420=0.700,L_1(3) = \frac{(3-1)(3-10)}{(5-1)(5-10)} = \frac{(2)(-7)}{(4)(-5)} = \frac{-14}{-20} = 0.700, L2(3)=(31)(35)(101)(105)=(2)(2)(9)(5)=4450.089.L_2(3) = \frac{(3-1)(3-5)}{(10-1)(10-5)} = \frac{(2)(-2)}{(9)(5)} = \frac{-4}{45} \approx -0.089 .

Estimate: P(3)=3.0(0.389)+4.0(0.700)+4.5(0.089)=3.567%P(3) = 3.0(0.389) + 4.0(0.700) + 4.5(-0.089) = 3.567\%. Note the weight on the 10-year point is negative, the quadratic curve overshoots slightly to bend through all three points, a mild early warning sign of Runge-type behavior.

L₀ ≈ 0.39 L₁ ≈ 0.70 L₂ ≈ −0.09
The three Lagrange weights sum to 1, but one is negative, a signature of the fitted curve bending to pass exactly through every point rather than staying between them.

Worked example 2: watching the wobble with more points

Adding a fourth point (a 30-year rate of 4.2%, lower than the 10-year rate because of curve inversion) forces a degree-3 polynomial through all four points. Because 4.2% at 30 years sits below 4.5% at 10 years while all the shorter maturities were rising, the cubic polynomial connecting them can overshoot well above 4.5% or dip well below 3.0% somewhere between the plotted points to accommodate that direction change, producing implied rates for, say, a 7-year point that look implausible even though every actual quoted point is matched exactly. This overshoot, worsening as more points and a higher polynomial degree are added, is exactly why practitioners rarely use a single high-degree polynomial across a full yield curve.

high-degree polynomial overshoots between known points
The single polynomial passes exactly through all four known points, but swings well above and below them in between, Runge's phenomenon, worse near the edges and with higher degree.

What this means in practice

Polynomial interpolation underlies filling in a curve, a yield curve, a volatility smile, a dividend schedule, from sparse market quotes, and it's the conceptual foundation for numerical integration and root-finding methods that implicitly fit a local polynomial. In practice, though, quants rarely fit one high-degree polynomial across an entire dataset; instead they use lower-degree polynomials on small local pieces stitched together smoothly (see cubic splines), precisely to avoid the overshoot that a single global polynomial produces once the data has more than a handful of points.

There's exactly one polynomial of degree at most nn passing through n+1n+1 given points, and it can be written explicitly via Lagrange's formula, but a single polynomial fit through many points tends to oscillate wildly between them (Runge's phenomenon), which is why practitioners generally prefer piecewise, lower-degree interpolation over one high-degree global fit.

The classic mistake is assuming that adding more data points to a polynomial interpolation always produces a smoother, more accurate curve, the opposite can happen. Beyond a modest number of points, a single global polynomial's degree rises and its tendency to overshoot between points (especially near the edges of the fitted range) gets worse, not better. If a curve needs to be built from many points, use piecewise interpolation (splines) rather than one high-degree polynomial through everything.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. Ask and answer about this concept. Off-topic gets removed.
  2. No homework dumps. Show what you tried first.
  3. Corrections are welcome. Cite a source when you claim an error.

Loading discussion…

Related concepts

Practice in interviews

Further reading

  • Burden & Faires, Numerical Analysis, ch. 3
  • Press et al., Numerical Recipes, ch. 3
ShareTwitterLinkedIn