The market quotes an option's price; traders talk in its volatility. Turning one into the other means solving an equation that has no formula. And a curve is quoted at a handful of maturities, yet a cash flow can fall on any date in between.
Many questions run backwards. A formula gives a value from an input; you have the value and want the input. Rewrite it as f(x) = 0 and look for a rootA root of f: a value x with f(x) = 0. Solving g(x) = c is finding a root of f(x) = g(x) − c.. Other questions have gaps: you know a curve at a few points and need it in between. That is interpolationInterpolation: estimating a function between known points, by a rule that passes through every point..
Root finding: which σ makes the value (blue) equal the target 12 (dashed)?Interpolation: eight known points. What is the value at 4 years, or 15?
Both are solved numerically, and both have a fast method that can misbehave and a safe method that is slower or rougher. Knowing the trade-off is most of the skill.
The rules
Bisection. Start from a bracketA bracket: an interval [a, b] with f(a) and f(b) of opposite signs. A continuous f has a root inside it..
Newton's method. Follow the tangent, for quadratic convergenceQuadratic convergence: each error is roughly a constant times the square of the last, so correct digits about double per step., when it works.
Interpolation. Lines, lines in logs, and cubic splinesCubic spline: a cubic on each interval, joined so that the value, slope and curvature are continuous at every knot. through the knotsKnot: one of the known points that an interpolation passes through..
The formal version
Bisection: f(a0)f(b0)<0,mk=2ak+bk,∣mn−x∗∣≤2nb0−a0Newton: xk+1=xk−f′(xk)f(xk),∣xk+1−x∗∣≈2∣f′(x∗)∣∣f′′(x∗)∣∣xk−x∗∣2 near a simple rootLinear: y(x)=yi+xi+1−xix−xi(yi+1−yi);log-linear: y(x)=yi1−wyi+1w,w=xi+1−xix−xiNatural cubic spline: S∈C2[x0,xn],S∣[xi,xi+1] cubic,S(xi)=yi,S′′(x0)=S′′(xn)=0
x* is the root, with f continuous for bisection and f′(x*) ≠ 0 and f twice differentiable for Newton; x₀ < x₁ < … < xn are the knots with values yi (positive for log-linear); C² means continuous with continuous first and second derivatives. Sources: Press et al. (2007), sections 3.3, 9.1 and 9.4; Hagan and West (2006) for interpolation of curves.
Try it
First the root. Newton from 20% finds the volatility in three or four steps. Now set the strike to 160 and the price to 0.5, and start Newton at 10%: the curve is almost flat there, and Newton is thrown out of range. Bisection still gets there.
Try itFind the root: which volatility gives this price?
Method
call value against σ (S₀ = 100, 1 year, r = 5%) target and iterates
Step
σ
value − target
1
20%
−1.55e+0
2
24.129131%
6.59e−3
3
24.11169%
6.77e−8
4
24.111689%
2.13e−14
Implied volatility found24.1117%
Newton's error is squared each step: watch the last column lose digits two at a time.
Then the gaps. Compare the three methods, look at the slope panel, and bump the 5-year point: which methods keep the change local?
Try itFill the gaps: a curve through eight points
Interpolation
interpolated rate (per cent) before the bump (dashed)
Its slope (points per year): kinks in the curve show up as jumps here.
Rate at 4 years3.675%
Rate at 15 years4.25%
Largest move outside 3 to 7 years0 pt
Linear interpolation is local: a bump at 5 years moves only the curve between 3 and 7 years. But its slope jumps at every point. The points are an illustrative zero curve, not market data.
Worked examples
1. √2, two ways
Step 1 of 4
1
The equation
√2 is the root of f(x) = x² − 2. f(1) = −1 < 0 and f(2) = 2 > 0, so [1, 2] is a bracket.
2. Implied volatility by Newton
Step 1 of 4
1
The equation
A one-year call with strike 100 on a price of 100, rate 5%, is quoted at 12. Find σ with C(σ) − 12 = 0, where C is the Black-Scholes value from L5.1.05: The Black-Scholes formula. Its derivative in σ is the vega.
3. Filling in a curve at 4 years
Step 1 of 4
1
The points
An illustrative zero curve: 3.65% at 3 years and 3.7% at 5 years (continuous compounding). 4 years is halfway between.
Common mistakes
Each line below is a tempting slip. Spot what is wrong, then check.
Reaction
Check what stuck
Question 1 · objective 1
A bracket is 1 wide. How many bisection steps make it narrower than 0.001?
Question 2 · objective 2
Take one Newton step for f(x) = x² − 2 from x₀ = 1.5. What is x₁? (Give 4 decimal places.)
Question 3 · objective 3
A curve is 3.0% at 2 years and 3.6% at 5 years. What is its linearly interpolated value at 3 years, in per cent?
Question 4 · objective 2
When is Newton's method most likely to fail?
Question 5 · objective 4
What does a natural cubic spline guarantee that linear interpolation does not?
Glossary
Root
A root of f: a value x with f(x) = 0. Solving g(x) = c is finding a root of f(x) = g(x) − c.
Bracket
A bracket: an interval [a, b] with f(a) and f(b) of opposite signs. A continuous f has a root inside it.
Bisection
Bisection: halve the bracket again and again, keeping the half where f changes sign. Slow but certain.
Newton's method
Newton's method: x_{k+1} = x_k − f(x_k)/f′(x_k), the zero of the tangent at the current guess.
Quadratic convergence
Quadratic convergence: each error is roughly a constant times the square of the last, so correct digits about double per step.
Interpolation
Interpolation: estimating a function between known points, by a rule that passes through every point.
Log-linear interpolation
Log-linear interpolation: linear interpolation of the logarithm of a positive quantity, such as a discount factor.
Knot
Knot: one of the known points that an interpolation passes through.
Cubic spline
Cubic spline: a cubic on each interval, joined so that the value, slope and curvature are continuous at every knot.
Deep Dives & Origins
Deep Dives
Press et al., Numerical Recipes, section 9.3: Brent's method, which combines bisection's safety with near-Newton speed and needs no derivative. Advanced.
Hagan and West, “Interpolation methods for curve construction”: a survey of curve interpolation, judged by smoothness, locality and the forward rates it produces. Advanced.
Origins
William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, Numerical Recipes: The Art of Scientific Computing, 3rd edition, Cambridge University Press, 2007 (3.3 cubic spline interpolation; 9.1 bracketing and bisection; 9.4 Newton-Raphson).
Patrick Hagan and Graeme West, “Interpolation methods for curve construction”, Applied Mathematical Finance 13(2), 89–129, 2006.