Itô's Lemma

Ordinary calculus has the chain rule: how a function of a changing quantity changes. Itô's lemma is the chain rule for functions of Brownian motion. It has one extra term, and this chapter shows exactly where that term comes from.

4.1The Surviving Second-Order Term

Take a function $f$, such as $e^x$, and follow $f(W_t)$ along a Brownian path. Over one small piece of time, the change in $f$ can be split into a sum of simpler terms: a first-order term using the slope $f'$, a second-order term using the curvature $f''$, and so on. Add each kind of term up over all $n$ pieces. The bars show the totals along one path.

Predict first: As the pieces shrink, which total will NOT shrink to 0 (apart from the first-order one)?

Drag $n$ up. In ordinary calculus, every term beyond the first would shrink to nothing. Watch which ones do here.

$$f(W_{t+\Delta t}) - f(W_t) \;=\; f'(W_t)\,\Delta W \;+\; \tfrac12 f''(W_t)\,(\Delta W)^2 \;+\; \tfrac16 f'''(W_t)\,(\Delta W)^3 \;+\; \cdots$$
$f$
Any smooth function, chosen below: $e^x$, $\sin x$ or $x^3$.
$f',\ f'',\ f'''$
Its first, second and third derivatives. $f'$ is the slope, $f''$ is how fast the slope changes (curvature), and $f'''$ is how fast the curvature changes. For $x^3$: $f' = 3x^2$, $f'' = 6x$, $f''' = 6$.
$\Delta t,\ \Delta W$
The length of one small piece of time, and the path's rise across it.
$\cdots$
Higher-order terms, which use fourth and higher derivatives. They shrink even faster than the third-order term.
Taylor expansion
The name of this recipe: a change in $f$ is the slope × the step, plus a curvature correction × the step squared, and so on.

In plain words: for a smooth curve, a step of size $\Delta t$ makes the squared term about $(\Delta t)^2$. Summed over $n = 1/\Delta t$ pieces, that totals about $\Delta t$, which vanishes. For Brownian motion the step is $\Delta W \approx \sqrt{\Delta t}$, so $(\Delta W)^2 \approx \Delta t$. Summed over all the pieces, that is a fixed amount that does not vanish: section 2.1's quadratic variation again. The cubed term is about $(\Delta t)^{3/2}$ per piece and does vanish in total. So exactly one extra term survives: the second-order one.

Going deeper: the precise statement

Sketch of the proof of Itô's lemma. Write $f(W_t) - f(W_0) = \sum_i [f(W_{t_{i+1}}) - f(W_{t_i})]$ and expand each term with Taylor's theorem. Three facts finish the proof as the partition is refined:

  • $\sum_i f'(W_{t_i})\,\Delta W_i \to \int_0^t f'(W_s)\,dW_s$ by the definition of the Itô integral.
  • $\sum_i f''(W_{t_i})\,(\Delta W_i)^2 \to \int_0^t f''(W_s)\,ds$, a weighted version of quadratic variation (section 2.1).
  • The remainder is at most a constant × $\max_i \lvert \Delta W_i \rvert \cdot \sum_i (\Delta W_i)^2 \to 0 \cdot t = 0$.

Reference: Shreve, Stochastic Calculus for Finance II, §4.4.

Show the code (Python + NumPy)
import numpy as np
rng = np.random.default_rng(10)
N = 2 ** 16
W = np.concatenate([[0], np.cumsum(rng.normal(0, np.sqrt(1 / N), N))])
f = d1 = d2 = d3 = np.exp                            # f(x) = e^x is its own derivative
for n in (8, 2 ** 16):
    x, dW = W[:-1:N // n], np.diff(W[::N // n])
    t1, t2, t3 = np.sum(d1(x) * dW), np.sum(d2(x) * dW ** 2) / 2, np.sum(d3(x) * dW ** 3) / 6
    print(f"n = {n:>5}: first {t1:.3f}  second {t2:.3f}  third {t3:+.4f}  "
          f"first+second {t1 + t2:.3f}  exact {f(W[-1]) - f(0):.3f}")
print(f"half the integral of f'' dt = {np.mean(d2(W[:-1])) / 2:.3f}")

Output when we ran it:

n =     8: first -1.026  second 0.435  third -0.0908  first+second -0.592  exact -0.668
n = 65536: first -0.937  second 0.269  third -0.0000  first+second -0.668  exact -0.668
half the integral of f'' dt = 0.267

4.2Itô's Lemma in Action

Section 4.1 gives the new chain rule. The chart tests it. Along one Brownian path, the thick grey curve is the true $f(W_t)$. The two thin curves rebuild it from scratch by adding up small changes: orange uses Itô's lemma, purple uses the ordinary chain rule. Switch between functions.

Predict first: For f(x) = x², where will the purple naive chain-rule curve end up compared with the truth?

$$df(W_t) \;=\; f'(W_t)\,dW_t \;+\; \tfrac12 f''(W_t)\,dt$$
$d$
"A tiny change in". $df(W_t)$ is the tiny change in $f(W_t)$ over a tiny time step $dt$, and $dW_t$ is the tiny rise of the path over it. Adding up these tiny changes means taking an integral.
$f'(W_t)\,dW_t$
The ordinary chain-rule term: slope × change. Added up, it is an Itô integral (Chapter 3).
$\tfrac12 f''(W_t)\,dt$
The extra Itô term: half the curvature × the time step. Added up, it is an ordinary integral over time.
chain rule
Ordinary calculus's rule $df(x) = f'(x)\,dx$: the change in $f$ is its slope × the change in $x$. It is correct for smooth paths, and it misses the second term for Brownian ones.

In plain words: when $f$ curves upward ($f'' > 0$), jiggling back and forth doesn't cancel out. A step up raises $f$ by more than an equal step down lowers it. So $f(W)$ creeps upward on average, at rate $\tfrac12 f''$. The ordinary chain rule can't see this because it assumes paths are smooth. For $f(x) = x^2$, Itô's lemma says $d(W^2) = 2W\,dW + dt$. The "$+\,dt$" is the upward drift of $W^2$ you saw in section 2.2.

Going deeper: the precise statement

Itô–Doeblin formula, general form. If $dX_t = a_t\,dt + b_t\,dW_t$ and $f(t, x)$ is smooth, then $$df(t, X_t) = \Big(\partial_t f + a_t\,\partial_x f + \tfrac12 b_t^2\,\partial_{xx} f\Big)dt + b_t\,\partial_x f\,dW_t.$$ The bookkeeping rules are $dt\cdot dt = 0$, $dt\cdot dW = 0$ and $dW\cdot dW = dt$.

History. Kiyosi Itô published the formula in 1951. Wolfgang Doeblin had derived it independently in 1940, in a sealed envelope sent to the French Academy of Sciences shortly before his death in the war. The envelope was opened only in 2000, which is why the formula is increasingly called Itô–Doeblin.

References: Shreve, Stochastic Calculus for Finance II, §4.4. Øksendal, Stochastic Differential Equations, ch. 4.

Show the code (Python + NumPy)
import numpy as np
rng = np.random.default_rng(11)
steps = 16_384
dt = 1 / steps
W = np.concatenate([[0], np.cumsum(rng.normal(0, np.sqrt(dt), steps))])
x, dW = W[:-1], np.diff(W)
naive = np.sum(2 * x * dW)                   # chain rule for f(x) = x^2: df = 2x dx
ito = naive + steps * dt                     # Ito adds 1/2 f''(x) dt = dt at every step
print(f"true W_1^2 = {W[-1] ** 2:.3f}   Ito = {ito:.3f}   naive = {naive:.3f}")

Output when we ran it:

true W_1^2 = 0.577   Ito = 0.576   naive = -0.424

4.3Itô vs Stratonovich

Section 3.1 showed two popular reading rules: Itô (left end) and Stratonovich (midpoint). They give different integrals, so the "same" equation means different things under each. Here, the same Brownian path drives the equation "$X$ changes by $X$ × the rise of $W$", read both ways. Then tick the box to add a correction term to the Itô version.

Predict first: Before you tick the box: which curve will end higher?

$$dX_t = X_t \circ dW_t \quad\Longleftrightarrow\quad dX_t = \tfrac12 X_t\,dt + X_t\,dW_t$$
$X_t$
A quantity that grows or shrinks in proportion to itself, starting at $X_0 = 1$: a price moving in percentage terms, for example.
$\circ\, dW_t$
The circle marks the Stratonovich reading: $X$ is read at the midpoint of each small step, like $\theta = \tfrac12$ in section 3.1.
$dW_t$ (no circle)
The Itô reading: $X$ is read at the start of each step.
$\Longleftrightarrow$
"Describes exactly the same process as".
$\tfrac12 X_t\,dt$
The conversion drift: the amount you must add to an Itô equation to make it match the Stratonovich one.

In plain words: reading $X$ at the midpoint means it has already reacted to half of the current step's rise, which quietly adds a little growth each step. On average that is $\tfrac12 X\,dt$, the same "peeking" effect as in section 3.1. So the Stratonovich equation grows like $e^{W_t}$, while the Itô equation without the correction grows like $e^{W_t - t/2}$. Add the drift to the Itô version and the two become identical. Neither reading is wrong. They are two languages, and the drift term translates between them.

Going deeper: the precise statement

General conversion rule. For a smooth coefficient $b(x)$: $$dX = a(X)\,dt + b(X)\circ dW \quad\Longleftrightarrow\quad dX = \big(a(X) + \tfrac12\,b(X)\,b'(X)\big)dt + b(X)\,dW.$$ In this section $a = 0$ and $b(x) = x$, so the extra drift is $\tfrac12 x$.

Why physicists like Stratonovich: the Wong–Zakai theorem. If you replace $W$ by a smooth approximation (real noise always has some tiny correlation time), solve the ordinary differential equation, and then let the approximation become rough, the solutions converge to the Stratonovich solution. Stratonovich calculus also obeys the ordinary chain rule.

References: E. Wong & M. Zakai, Ann. Math. Statist. 36 (1965), 1560–1564. Øksendal, Stochastic Differential Equations, ch. 3.

Show the code (Python + NumPy)
import numpy as np
rng = np.random.default_rng(12)
steps = 2_000
dt = 1 / steps
dW = rng.normal(0, np.sqrt(dt), steps)
ito, ito_drift, strat = 1.0, 1.0, 1.0
for d in dW:
    ito += ito * d                                   # dX = X dW, read at the left end
    ito_drift += 0.5 * ito_drift * dt + ito_drift * d   # the same plus the conversion drift
    guess = strat + strat * d                        # Stratonovich: Heun (midpoint) step
    strat += 0.5 * (strat + guess) * d
W1 = dW.sum()
print(f"Ito {ito:.3f} (e^(W - 1/2) = {np.exp(W1 - 0.5):.3f})   Ito + drift {ito_drift:.3f}   "
      f"Stratonovich {strat:.3f} (e^W = {np.exp(W1):.3f})")

Output when we ran it:

Ito 1.027 (e^(W - 1/2) = 1.036)   Ito + drift 1.693   Stratonovich 1.708 (e^W = 1.708)

4.4Two Brownian Motions

Real models rarely have just one source of randomness. Two stock prices, or a price and its volatility, are driven by two Brownian motions that tend to move together (or against each other) without being identical. The slider $\rho$ ("rho") sets how strongly the blue and purple paths move together.

Predict first: Set ρ = 0.8. The running sum of (rise of W₁) × (rise of W₂) will…

Drag $\rho$ from −1 to 1. Watch the paths, their shape in the plane, and the running sum at the bottom.

$$dW^{(1)}_t\,dW^{(2)}_t = \rho\,dt \qquad\Longrightarrow\qquad d(XY) = X\,dY + Y\,dX + dX\,dY$$
$W^{(1)},\ W^{(2)}$
Two Brownian motions, blue and purple. Each one on its own is an ordinary Brownian motion (Chapter 1).
$\rho$
Their correlation, from −1 to 1 (section 1.2): 1 means they move in lockstep, 0 means independently, −1 means they are mirror images.
$dW^{(1)}\,dW^{(2)} = \rho\,dt$
Multiplying their tiny rises and adding up gives $\rho$ × elapsed time. With $\rho = 1$ this is section 2.1's $(dW)^2 = dt$, and with $\rho = 0$ the products cancel out to 0.
$X,\ Y$
Any two processes built from these Brownian motions. Here simply $X = W^{(1)}$ and $Y = W^{(2)}$.
$d(XY)$
The tiny change in the product $X \times Y$.
$dX\,dY$
The extra term of the Itô product rule. In ordinary calculus it vanishes. Here it equals $\rho\,dt$.

In plain words: you build a pair with correlation $\rho$ by mixing: $W^{(2)}$ takes a share $\rho$ of $W^{(1)}$'s kicks plus a share $\sqrt{1-\rho^2}$ of its own independent kicks. Their rises then multiply to $\rho\,dt$ on average, and just as in section 2.1 the sum of those products is not random at all: it is exactly $\rho t$. That is why the ordinary product rule $d(XY) = X\,dY + Y\,dX$ gains a third term, $dX\,dY$. It is Itô's lemma for a function of two variables.

Top right: the point (W₁, W₂) wanders in the plane. With ρ near ±1 it is squeezed onto a diagonal, with ρ = 0 it spreads out equally in every direction. Bottom: the running sum settles on the dashed line ρt.

Going deeper: the precise statement

Construction. If $B^{(1)}, B^{(2)}$ are independent Brownian motions, then $W^{(1)} = B^{(1)}$ and $W^{(2)} = \rho B^{(1)} + \sqrt{1-\rho^2}\,B^{(2)}$ are Brownian motions with $\operatorname{Cov}(W^{(1)}_t, W^{(2)}_t) = \rho t$ and cross-variation $[W^{(1)}, W^{(2)}]_t = \rho t$. In $d$ dimensions, a correlation matrix $C$ is factored as $C = LL^{\top}$ (the Cholesky factorisation) and one sets $W = LB$.

Multivariable Itô formula. For smooth $f(x, y)$: $$df(X,Y) = f_x\,dX + f_y\,dY + \tfrac12 f_{xx}\,(dX)^2 + f_{xy}\,dX\,dY + \tfrac12 f_{yy}\,(dY)^2,$$ using $dW^{(i)}dW^{(j)} = \rho_{ij}\,dt$ and $dt\cdot dW = dt \cdot dt = 0$. The product rule is the case $f(x, y) = xy$.

Lévy's characterisation, two dimensions. Two continuous martingales starting at 0 with $[M^{(1)}]_t = [M^{(2)}]_t = t$ and $[M^{(1)}, M^{(2)}]_t = 0$ are independent Brownian motions.

Reference: Shreve, Stochastic Calculus for Finance II, §4.6.

Show the code (Python + NumPy)
import numpy as np
rng = np.random.default_rng(19)
rho, steps = 0.6, 100_000
dt = 1 / steps
dB1, dB2 = rng.normal(0, np.sqrt(dt), (2, steps))     # two independent noises
dW1 = dB1
dW2 = rho * dB1 + np.sqrt(1 - rho ** 2) * dB2          # correlated with dW1
W1 = np.concatenate([[0], np.cumsum(dW1)])
W2 = np.concatenate([[0], np.cumsum(dW2)])
print(f"sum of dW1 * dW2 = {np.sum(dW1 * dW2):.3f}   (theory: rho = {rho})")
integrals = np.sum(W1[:-1] * dW2) + np.sum(W2[:-1] * dW1)   # Ito integrals, left-end rule
print(f"W1 * W2 = {W1[-1] * W2[-1]:.3f}   integrals = {integrals:.3f}   integrals + rho = {integrals + rho:.3f}")

Output when we ran it:

sum of dW1 * dW2 = 0.598   (theory: rho = 0.6)
W1 * W2 = -0.063   integrals = -0.660   integrals + rho = -0.060

Chapter recap

Quick questions on this chapter's big ideas. Each answer is explained as soon as you choose.

1. By Itô's lemma, the tiny change d(W²) equals…

2. Why does a second-order term survive in stochastic calculus but not in ordinary calculus?

3. Two Brownian motions have correlation ρ = −0.5. Over time 0 to 1, the sum of products of their rises approaches…