Curve interpolation, extrapolation and arbitrage
Choosing the state to interpolate by controlling off-grid discount and forward behaviour
01Compare linear-zero, log-linear-discount and monotone interpolation.
02Derive the forward curve implied by an interpolation rule.
03Detect negative discount factors, impossible accumulations and local forward spikes.
04Explain why interpolation is a risk-model choice between liquid pillars.
Identify the state variables and the behavior they add.
The market constrains a sparse set of instruments, but valuation asks for every date. Interpolation specifies the untraded economy between pillars and therefore changes cash-flow PV, carry and hedge allocation.
Interpolate a mathematically controlled state, not whichever quote is easiest to display.
Log-linear discounting preserves positive discount factors and gives piecewise-constant continuous forwards.
Smooth curves can still be economically unstable if their derivatives oscillate.
Ask which instruments can identify the dynamics.
Off-grid coupons, broken-date trades, forward starts and risk buckets all depend on interpolation and extrapolation beyond liquid tenors.
broken-date swaps
forward-start swaps
bonds
long-dated exotics
Record interpolation variable, order, boundary conditions, extrapolation policy and the liquid horizon with every curve build.
Write the dynamics before interpreting parameters.
Log-linear discount
Linear interpolation in log discount guarantees a positive discount factor after exponentiation.
Open in AnalyticsSegment forward
Log-linear discounting implies one constant continuous forward on each segment.
Open in AnalyticsShort derivation
From log-discount interpolation to a segment forward
Differentiate the state actually interpolated, then inspect the economic quantity used by forward-start products.
- 01
Choose log discount as state
Write ℓ_i=ln P_i at each positive discount pillar.
- 02
Interpolate linearly
Between T_i and T_{i+1}, ℓ has a constant slope.
- 03
Differentiate
The negative derivative of ℓ is the instantaneous forward and is constant on the segment.
- 04
Reintegrate
Integrating the segment forwards reproduces every input pillar exactly.
- 05
Stress the boundaries
Inspect discontinuities in forwards at nodes and compare extrapolated PV/risk outside the last liquid tenor.
Interpolation selects off-grid forwards and risk allocation; it belongs in model governance, not chart styling.
Inputs
\ell(T)=\ln P(0,T): log discountf(0,T)=-\ell'(T): instantaneous forwardT_i: liquid pillarsw(T): interpolation weight
Assumptions and limits
- Piecewise-constant forwards jump at pillars.
- Higher-order splines can overshoot or create oscillating forwards.
- Any extrapolation beyond the liquid horizon is a model assumption.
Reconstruction identity
Any interpolated forward representation must integrate back to the discount curve.
Open in AnalyticsCalibrate, compute, and challenge the dynamics.
Interpolate one controlled state, expose derived zero/forward/discount views, and run node-reconstruction plus off-grid perturbation tests.
Choose the rule by product needs, hedge stability and historical robustness—not in-sample curve smoothness alone.
Implementation with current QuantLib
Select curve traits and interpolation deliberately—Discount/LogLinear, Zero/Linear or Forward variants imply different off-grid dynamics. Lock the policy in regression tests with discounts, forwards and instrument NPVs.
API authority: upstream QuantLib reference pinned in the source registry.06PYTHON IMPLEMENTATIONOpen the implementation and checks.
- Keep market conventions and quote lineage at the boundary.
- Solve curves and dynamics in framework-free deterministic kernels.
- Return residuals, state and sensitivities with every value.
- Test analytical limits, reconstruction identities and failure domains.
Log-linear discount interpolation
Preserve node discounts and verify a constant segment forward.
from __future__ import annotations import math def log_linear(t: float, t0: float, p0: float, t1: float, p1: float) -> float: if not (0 < t0 < t1 and t0 <= t <= t1 and p0 > 0 and p1 > 0): raise ValueError("invalid interpolation domain") w = (t - t0) / (t1 - t0) return math.exp(math.log(p0) + w * (math.log(p1) - math.log(p0))) p1, p3 = math.exp(-0.02), math.exp(-0.03 * 3.0)p2 = log_linear(2.0, 1.0, p1, 3.0, p3)assert abs(math.log(p1 / p2) - math.log(p2 / p3)) < 1e-12assert log_linear(1.0, 1.0, p1, 3.0, p3) == p1print(f"P2={p2:.9f}")Shock one parameter and trace the full response.
Interpolation stress laboratory
Compare linear-zero, log-linear-discount and monotone shapes; expose their forward and off-grid PV consequences.
Clean pillars: Methods remain controlled.
- log-linear discount
- monotone smooth
Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.
Where the model meets the book.
“The interpolation rule is where a sparse market becomes a dense risk model.”
curve pillars
interpolated state
boundary conditions
liquid horizon
product cash-flow dates
Reprice pillars identically, then choose among candidates using forward stability, hedge stability and out-of-sample broken-date behaviour.
RISKoff-grid DV01
node allocation
forward discontinuity
extrapolation
- fit same pillars
- derive forwards
- stress nodes
- compare broken dates
- approve one governed rule
Production failure modes
- spline overshoot
- hidden extrapolation
- negative discount output
- risk jumps after library upgrade
09MACRO CONNECTIONOpen the transmission channel.
Interpolation and the shape of priced expectations
Markets quote a few tenors; interpolation controls how a macro move is distributed between them and therefore how slope or butterfly risk appears.
transmitsreprices liquid pillars
transmitsfills unquoted dates
transmitsallocates local expectations
outputassigns risk to instruments
10COMMON PITFALLSOpen the failure checklist.
Choosing interpolation for visual smoothness only.
Inspecting zero rates without instantaneous forwards.
Assuming exact pillar fit means identical off-grid PV.
Extrapolating silently beyond market liquidity.
11SOURCES / FURTHER READINGOpen sources and continue the track.
Curve construction, multi-curve, short-rate and HJM lectures
Research map for term-structure theory and numerical experiments; all platform explanations and code are original.
- Source
- Financial Engineering: Interest Rates & xVA
- Author
- L. A. Grzelak
- Ref
- main
Monte Carlo, stochastic calculus and calibration lectures
Mathematical and numerical cross-reference for model dynamics and diagnostics.
- Source
- Computational Finance Course
- Author
- L. A. Grzelak
- Ref
- main
Current bootstrapping, interpolation, curve, model, cap/floor and swaption tests
Implementation authority for production object boundaries and regression-test patterns.
- Source
- QuantLib upstream
- Author
- QuantLib contributors
- Ref
- v1.42.1