Math Atom · M-B03

Taylor expansion

10 minMath AtomCalculus

Know these first

By the end you will be able to

  1. 1Approximate a curve near a point with its tangent line: the first-order approximation.
  2. 2Add a second-order term with the second derivative to bend the line into a parabola.
  3. 3Estimate f(a + Δx) to first and second order, and compare the errors.
  4. 4Explain why duration and convexity are the first- and second-order terms for a bond price.

Why you need it

A risk manager wants to know what a 1 percentage point jump in rates would do to a portfolio of thousands of bonds, quickly. Two numbers per bond, and one line of algebra, give a very good answer. This atom is that line.
  • L1.4.08

    Duration

    Duration is the first-order term: the straight-line estimate of a price change.

  • L1.4.09

    Convexity

    Convexity is the second-order term: the correction for the curve's bend.

The idea

A line, then a bend

You know a curve well at one point: its value, its slope and how sharply it bends. Can you guess its value a little way off? Think of driving: knowing where you are and your speed, you can guess where you will be in a minute. Knowing whether you are speeding up makes the guess better. Step through three guesses for a bond price curve.

Three guesses, each better than the last

Step 1 of 3
  1. 1

    Order 0: nothing changes

    A flat line at today's value. Right at the dot, wrong everywhere else.

That is the whole idea of a Taylor expansion: build a simple curve that matches the real one at a point, first in level, then in slope, then in bend. Each extra term is a higher order.

The rules

To measure the bend we need one new tool, the second derivative.

Now build the approximation one order at a time.

For a bond. Put the bond price into the same formula, and two famous names drop out.

The formulas, for reference

f(a+Δx)≈f(a)+f′(a) Δx+12f′′(a) (Δx)2f(a+\Delta x) \approx f(a) + f'(a)\,\Delta x + \tfrac12 f''(a)\,(\Delta x)^2
ΔPP≈−D Δy+12C (Δy)2,D=−P′P,C=P′′P\frac{\Delta P}{P} \approx -D\,\Delta y + \tfrac12 C\,(\Delta y)^2, \qquad D = -\frac{P'}{P}, \quad C = \frac{P''}{P}

The error of a first-order estimate shrinks roughly with (Δx)2(\Delta x)^2, and of a second-order estimate with (Δx)3(\Delta x)^3: halve the step, and they shrink about 4 and 8 times.

Try it

Push the step Δx out in both directions and compare the two guesses with the true value (the open circle). The tangent always sits below a curve that bends upwards, so it overstates the fall and understates the rise. Then switch to the 30-year bond: more bend, so the second-order term matters more.

Try itTaylor overlay

Curve

True value at a + Δx

50.8349

Order 1 guess49.6977
Order 1 error−1.1372
Order 2 guess50.9228
Order 2 error0.0879
the curve order 1 order 2
2550751000%5%10%15%a

Halve the step and watch the errors: order 1 shrinks about 4 times, order 2 about 8 times.

Δxorder 1 errororder 2 error
2 pt−1.137190.087853
1 pt−0.2949450.011315
0.5 pt−0.0751290.001436

Worked examples

1. √102 without a calculator

Step 1 of 4
  1. 1

    What we know at a = 100

    f(100)=10,f′(100)=12100=0.05,f′′(100)=−14×1001.5=−0.00025f(100) = 10, \quad f'(100) = \frac{1}{2\sqrt{100}} = 0.05, \quad f''(100) = -\frac{1}{4 \times 100^{1.5}} = -0.00025

2. A bond price after a 1 point move

Step 1 of 4
  1. 1

    What we know at 5%

    100 paid in 10 years, annual compounding: P(y)=100(1+y)−10P(y) = 100(1+y)^{-10}. At 5%: P=61.3913P = 61.3913, P′=−584.68P' = -584.68, P′′=110×100×1.05−12=6,125.2P'' = 110 \times 100 \times 1.05^{-12} = 6{,}125.2.

3. The same, in duration and convexity

Step 1 of 3
  1. 1

    The two numbers

    D=−P′P=101.05=9.5238C=P′′P=1101.052=99.7732D = -\frac{P'}{P} = \frac{10}{1.05} = 9.5238 \qquad C = \frac{P''}{P} = \frac{110}{1.05^2} = 99.7732

Common mistakes

Each line below is a tempting slip. Spot what is wrong, then check.

Reaction

Check what stuck

Question 1 · objective 1

f(a) = 50 and f′(a) = −4. Use a first-order approximation to estimate f(a + 0.5).

Question 2 · objective 2

Same point, and now f″(a) = 6. What is the second-order estimate of f(a + 0.5)?

Question 3 · objective 3

Estimate √26 with a first-order approximation from √25 = 5. (The derivative of √x is 1 ÷ (2√x).)

Question 4 · objective 2

Which term of the expansion captures how the curve bends?

Question 5 · objective 4

In ΔP/P ≈ −DΔy + ½C(Δy)², duration D belongs to which part of the Taylor expansion?

Glossary

Second derivative
The derivative of the derivative, written f″(x). It measures how fast the slope changes: how sharply the curve bends.
Taylor expansion
An approximation of f near a point a built from f and its derivatives at a: f(a) + f′(a)Δx + ½f″(a)(Δx)² + …
Order
The highest power of the step Δx used in an approximation. First order uses Δx, second order adds (Δx)².
Curvature
How much a curve bends away from a straight line.
Parabola
The U-shaped (or upside-down U) curve of a quadratic, such as y = x².
Modified duration
D = −P′/P: the first-order sensitivity of a price to its yield, in percent per unit of yield.
Convexity
C = P″/P: the second-order term, measuring how the price-yield curve bends.