Math Atom · M-B01

Derivatives

10 minMath AtomCalculus

Know these first

By the end you will be able to

  1. 1Explain the derivative f′(x) as the slope of f at x, and read the notation f′(x) and dy/dx.
  2. 2Find derivatives with three rules: powers, constant multiples and sums.
  3. 3Find the derivative of a discount factor (1 + y)⁻ᵗ with respect to y.
  4. 4Use a derivative to estimate the change in a function from a small change in its input.

Why you need it

If interest rates tick up by 0.1 percentage points, how much does a bond lose? You could reprice it. Or you could ask for the slope of price against yield, once, and multiply. That slope is a derivative.
  • L1.4.08

    Duration

    Duration is built from the derivative of a bond's price with respect to its yield.

Derivatives measure sensitivity, and sensitivities run all through risk management. The next atom, M-B03 Taylor expansion, builds on this one.

The idea

Zoom in until the curve looks straight

In the slopes atom you found the slope of a curve at a point by shrinking chords. Here is another way to see it. Take any smooth curve and zoom in on one point. The closer you look, the straighter it gets. Zoom in on the price of a bond paying 100 in 10 years, around a 5% yield.

Zoom in on a curve

1× zoom

Window 0.000% to 10.000%

Bend from straight 12.83% of the height

Slope across window −614.5

Clearly a curve. Now zoom in on the dot.

Zoomed in far enough, the curve is a straight line, and a straight line has one slope. That slope is the derivative at that point. A speedometer is a good picture: it shows how fast you are going right now, not your average over the whole trip.

Shrinking chords every time would be slow. The good news is that for the functions finance uses, a few short rules give the derivative straight away.

The rules

First, the notation. There are a few ways to write the same thing.

Powers. The workhorse rule is the power rule.

Constants and sums. Two more rules let you take a formula apart, piece by piece.

The discount factor. The present value of a payment is a power of (1+y)(1+y), so the power rule does the work.

Estimating a small change. Near a point, the curve is almost its tangent. So, for a small step Δx\Delta x, the change in ff is about the slope times the step:

f′(x)≈ΔfΔx    ⟹    Δf≈f′(x) Δx    ⟹    f(x+Δx)≈f(x)+f′(x) Δxf'(x) \approx \frac{\Delta f}{\Delta x} \;\;\Longrightarrow\;\; \Delta f \approx f'(x)\,\Delta x \;\;\Longrightarrow\;\; f(x + \Delta x) \approx f(x) + f'(x)\,\Delta x

This is called a linear approximation. It is good for small steps and gets worse for big ones, because the curve bends away from its tangent. M-B03 shows how to correct for the bend.

The rules, for reference

FunctionDerivative
c (a constant)0
xⁿn·xⁿ⁻¹
c·f(x)c·f′(x)
f(x) + g(x)f′(x) + g′(x)
C(1 + y)⁻ᵗ−t·C(1 + y)⁻ᵗ⁻¹

Small change: Δf ≈ f′(x)·Δx.

Try it

Drag the dot along the curve. The dashed tangent shows the slope; the lower chart plots that slope as its own function. On x³ − 3x, find where the slope is zero and see what the curve does there. Then pick the bond price and raise Δy: the estimate (small dot) drifts away from the actual change (bar) as the step grows.

Function

f′(x) = 2x

Slope here, by the rule

2

Check: tiny chord2
The curve isincreasing
Estimate f′ × Δ1
Actual change1.25
Error0.25
the function tangent: drag the dot actual change
048-3-2-10123

The derivative as its own graph: the height here is the slope above.

−606-3-2-10123

Worked examples

1. Three rules at once

Step 1 of 4
  1. 1

    The set-up

    Find the derivative of f(x)=3x4−2x+7f(x) = 3x^4 - 2x + 7, then its value at x=1x = 1 and x=2x = 2.

2. How fast a far-off payment loses value

Step 1 of 5
  1. 1

    The set-up

    100 is paid in 10 years. At a yield of 5% (annual compounding) it is worth P(y)=100(1+y)−10P(y) = 100(1+y)^{-10}. Find P′(0.05)P'(0.05), and estimate the change in value if the yield rises by 0.1 percentage points.

3. Two payments: the sum rule at work

Step 1 of 4
  1. 1

    The set-up

    50 in one year and 150 in two years, valued at a yield yy: P(y)=50(1+y)−1+150(1+y)−2P(y) = 50(1+y)^{-1} + 150(1+y)^{-2}. Find P′(0.04)P'(0.04).

Common mistakes

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

Reaction

Check what stuck

Question 1 · objective 2

f(x) = 4x³. What is f′(2)?

Question 2 · objective 2

What is the derivative of f(x) = 7?

Question 3 · objective 3

What is the derivative of (1 + y)⁻² with respect to y, at y = 0?

Question 4 · objective 4

f(x) = x². f(10) = 100 and f′(10) = 20. Use the derivative to estimate f(10.1).

Question 5 · objective 3

P(y) = 100(1 + y)⁻⁵. What is P′(y) at y = 0.04, to two decimal places?

Glossary

Derivative
The slope of a function at a point, written f′(x) or dy/dx. As a function of x, it gives the slope everywhere.
f′(x), dy/dx
Two ways to write the derivative. f′ is read 'f dash' or 'f prime'; dy/dx is read 'd y by d x'.
Power rule
The derivative of xⁿ is n·xⁿ⁻¹: bring the power down and lower it by one.
Tangent
The straight line that touches a curve at a point with the same slope as the curve there.
Linear approximation
Using the tangent line in place of the curve for a small step: f(x + Δx) ≈ f(x) + f′(x)·Δx.
Sensitivity
How much an output moves for a small move in an input. A derivative measures it.