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$
- 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.
As the pieces shrink, the third-order bar disappears. The second-order bar settles to $\tfrac12\int_0^1 f''(W_t)\,dt$ (the dashed tick), and "first + second" matches the exact change. Replacing $(\Delta W)^2$ by $\Delta t$, the rule $(dW)^2 = dt$, is all it takes to turn the second-order term into an ordinary time integral.
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?
- $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.
Itô's rebuild lies right on top of the truth, while the naive chain rule drifts away by exactly $\tfrac12\int f''(W)\,dt$. This is Itô's lemma, the central tool of stochastic calculus. Everything that follows (solving random equations, pricing options) is Itô's lemma applied to the right function.
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?
- $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.
Same noise, same-looking equation, different answers, until the conversion drift is added. Physicists often prefer Stratonovich, because the ordinary chain rule works for it. Finance uses Itô, because you can't trade on a price you haven't seen yet. The rest of this site uses Itô.
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)
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…