Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Stochastic models

Itô's lemma

Lesson 9 of 15 · 1 min read

The lesson "Random walks and Brownian motion" showed that Brownian paths have no slope anywhere, so ordinary calculus does not apply to them directly. This lesson develops the replacement, Itô's lemma, the chain rule for functions of a random process. Its key ingredient is a surprising fact about squared increments of Brownian motion.

Increments in continuous time

Write dWtdW_tdWt​ for the increment of a Brownian motion over a short interval dtdtdt. From the definition of Brownian motion it is normal with mean zero and variance dtdtdt:

dWt∼N(0, dt),E[dWt]=0,E[(dWt)2]=dt.dW_t \sim N(0,\ dt), \qquad \mathbb{E}[dW_t] = 0, \qquad \mathbb{E}\big[(dW_t)^2\big] = dt.dWt​∼N(0, dt),E[dWt​]=0,E[(dWt​)2]=dt.

A process driven by Brownian motion is described by its increment too. The general Itô process has a drift aaa and a volatility bbb, which may depend on time and on the current value:

dXt=a(t,Xt) dt+b(t,Xt) dWt.dX_t = a(t, X_t)\,dt + b(t, X_t)\,dW_t.dXt​=a(t,Xt​)dt+b(t,Xt​)dWt​.

Read it as a recipe for one small step: a deterministic move a dta\,dtadt plus a random move b dWtb\,dW_tbdWt​ whose typical size is bdtb\sqrt{dt}bdt​. For small dtdtdt the random part is much larger than the drift part, since dt\sqrt{dt}dt​ is much larger than dtdtdt.

Quadratic variation

In ordinary calculus, squares of small increments are negligible: if dxdxdx is small, (dx)2(dx)^2(dx)2 is much smaller and disappears in the limit. For Brownian motion this fails. Split [0,T][0, T][0,T] into nnn steps of length Δt=T/n\Delta t = T/nΔt=T/n and add up the squared increments:

Qn=∑i=1n(Wti−Wti−1)2.Q_n = \sum_{i=1}^{n} \big(W_{t_i} - W_{t_{i-1}}\big)^2.Qn​=i=1∑n​(Wti​​−Wti−1​​)2.

Each squared increment has mean Δt\Delta tΔt, so E[Qn]=n Δt=T\mathbb{E}[Q_n] = n\,\Delta t = TE[Qn​]=nΔt=T for every nnn. Each one also has variance 2 Δt22\,\Delta t^22Δt2 (a property of the normal distribution), and the increments are independent, so

Var⁡(Qn)=n⋅2 Δt2=2T2n⟶0as n→∞.\operatorname{Var}(Q_n) = n \cdot 2\,\Delta t^2 = \frac{2T^2}{n} \longrightarrow 0 \quad \text{as } n \to \infty.Var(Qn​)=n⋅2Δt2=n2T2​⟶0as n→∞.

The sum keeps its mean TTT while its randomness disappears: in the limit it equals TTT exactly. This limit is the quadratic variation of Brownian motion. Example: on [0,1][0,1][0,1] the standard deviation of QnQ_nQn​ is 2/n\sqrt{2/n}2/n​, which is 0.4470.4470.447 for n=10n = 10n=10, 0.1410.1410.141 for n=100n = 100n=100 and 0.04470.04470.0447 for n=1000n = 1000n=1000.

For a smooth path the same sum goes to zero, because each squared increment is of order Δt2\Delta t^2Δt2. Brownian motion is rough enough that its squared increments add up to something finite.

The sum of the absolute increments behaves very differently. Each ∣ΔW∣|\Delta W|∣ΔW∣ has mean 2Δt/π\sqrt{2\Delta t/\pi}2Δt/π​, so on [0,1][0,1][0,1] the total variation ∑∣ΔW∣\sum |\Delta W|∑∣ΔW∣ has mean n2/(πn)=2n/πn\sqrt{2/(\pi n)} = \sqrt{2n/\pi}n2/(πn)​=2n/π​: about 2.522.522.52 for n=10n = 10n=10, 7.987.987.98 for n=100n = 100n=100 and 25.2325.2325.23 for n=1000n = 1000n=1000. It grows without bound. The length travelled by a Brownian path is infinite, yet the sum of its squared steps settles down to elapsed time.

The figure draws four Brownian paths on [0,1][0,1][0,1] built from nnn normal increments ΔW∼N(0,1/n)\Delta W \sim N(0, 1/n)ΔW∼N(0,1/n) and plots the running sum ∑(ΔW)2\sum (\Delta W)^2∑(ΔW)2 of each against ttt, together with the line ttt. Switch between n=10n = 10n=10, 100100100 and 100010001000 and press "New paths" a few times. The running sums hug the line more tightly as nnn grows. The readouts, computed over 2000 paths at t=1t = 1t=1, show the mean of ∑(ΔW)2\sum (\Delta W)^2∑(ΔW)2 staying near 1, its standard deviation shrinking like 2/n\sqrt{2/n}2/n​, and the mean of ∑∣ΔW∣\sum |\Delta W|∑∣ΔW∣ growing like 2n/π\sqrt{2n/\pi}2n/π​.

Quadratic variationOpen in Itô Process →
t
Mean of Σ(ΔW)² at t = 1 (2000 paths)
1.000
Std. dev. of Σ(ΔW)²
0.141 (√(2/n) = 0.141)
Mean of Σ|ΔW|
7.98 (√(2n/π) = 7.98)

The result is written as a set of multiplication rules for small increments:

(dWt)2=dt,dt dWt=0,(dt)2=0.(dW_t)^2 = dt, \qquad dt\,dW_t = 0, \qquad (dt)^2 = 0.(dWt​)2=dt,dtdWt​=0,(dt)2=0.

Quadratic variation: the squared increments of Brownian motion over [0,T][0,T][0,T] add up to TTT. In shorthand, (dWt)2=dt(dW_t)^2 = dt(dWt​)2=dt.

Itô's lemma

Let f(t,x)f(t, x)f(t,x) be a smooth function and XtX_tXt​ an Itô process as above. We want the increment of Yt=f(t,Xt)Y_t = f(t, X_t)Yt​=f(t,Xt​). Expand fff to second order in a Taylor series:

df=∂f∂t dt+∂f∂x dXt+12∂2f∂x2 (dXt)2+⋯df = \frac{\partial f}{\partial t}\,dt + \frac{\partial f}{\partial x}\,dX_t + \frac{1}{2}\frac{\partial^2 f}{\partial x^2}\,(dX_t)^2 + \cdotsdf=∂t∂f​dt+∂x∂f​dXt​+21​∂x2∂2f​(dXt​)2+⋯

In ordinary calculus the third term would be dropped. Here it must be kept. Square dXt=a dt+b dWtdX_t = a\,dt + b\,dW_tdXt​=adt+bdWt​ using the multiplication rules: the (dt)2(dt)^2(dt)2 and dt dWtdt\,dW_tdtdWt​ terms vanish and only b2(dWt)2=b2 dtb^2 (dW_t)^2 = b^2\,dtb2(dWt​)2=b2dt survives:

(dXt)2=b2 dt.(dX_t)^2 = b^2\,dt.(dXt​)2=b2dt.

Higher-order terms are of order dt3/2dt^{3/2}dt3/2 or smaller and vanish. Substituting gives Itô's lemma:

df(t,Xt)=(∂f∂t+a ∂f∂x+12 b2 ∂2f∂x2)dt+b ∂f∂x dWt.df(t, X_t) = \left( \frac{\partial f}{\partial t} + a\,\frac{\partial f}{\partial x} + \frac{1}{2}\,b^2\,\frac{\partial^2 f}{\partial x^2} \right) dt + b\,\frac{\partial f}{\partial x}\,dW_t.df(t,Xt​)=(∂t∂f​+a∂x∂f​+21​b2∂x2∂2f​)dt+b∂x∂f​dWt​.

Compared with the ordinary chain rule there is one extra drift term, 12b2f′′\tfrac12 b^2 f''21​b2f′′. It is the price of the roughness of Brownian paths: the curvature of fff turns the random fluctuations of XXX into a systematic drift of f(X)f(X)f(X).

The square of Brownian motion

Take Xt=WtX_t = W_tXt​=Wt​ (so a=0a = 0a=0, b=1b = 1b=1) and f(x)=x2f(x) = x^2f(x)=x2, with f′=2xf' = 2xf′=2x and f′′=2f'' = 2f′′=2. Itô's lemma gives

d(Wt2)=dt+2Wt dWt.d\big(W_t^2\big) = dt + 2W_t\,dW_t.d(Wt2​)=dt+2Wt​dWt​.

Ordinary calculus would give only 2Wt dWt2W_t\,dW_t2Wt​dWt​. The random term has mean zero, so taking expectations of the accumulated increments leaves E[Wt2]=t\mathbb{E}[W_t^2] = tE[Wt2​]=t, which agrees with Var⁡(Wt)=t\operatorname{Var}(W_t) = tVar(Wt​)=t. Without the extra dtdtdt the expectation would wrongly stay at zero.

The logarithm of a stock price

The model of "Geometric Brownian motion" is dSt=μSt dt+σSt dWtdS_t = \mu S_t\,dt + \sigma S_t\,dW_tdSt​=μSt​dt+σSt​dWt​, an Itô process with a=μSa = \mu Sa=μS and b=σSb = \sigma Sb=σS. Apply Itô's lemma to f(S)=ln⁡Sf(S) = \ln Sf(S)=lnS, with f′=1/Sf' = 1/Sf′=1/S and f′′=−1/S2f'' = -1/S^2f′′=−1/S2:

dln⁡St=(μS⋅1S+12 σ2S2⋅(−1S2))dt+σS⋅1S dWt=(μ−12σ2)dt+σ dWt.d\ln S_t = \left( \mu S \cdot \frac{1}{S} + \frac{1}{2}\,\sigma^2 S^2 \cdot \left(-\frac{1}{S^2}\right) \right) dt + \sigma S \cdot \frac{1}{S}\,dW_t = \left(\mu - \tfrac{1}{2}\sigma^2\right) dt + \sigma\,dW_t.dlnSt​=(μS⋅S1​+21​σ2S2⋅(−S21​))dt+σS⋅S1​dWt​=(μ−21​σ2)dt+σdWt​.

The right-hand side has constant coefficients, so it can be added up over [0,T][0, T][0,T] directly:

ln⁡ST=ln⁡S0+(μ−12σ2)T+σWT.\ln S_T = \ln S_0 + \left(\mu - \tfrac{1}{2}\sigma^2\right) T + \sigma W_T.lnST​=lnS0​+(μ−21​σ2)T+σWT​.

This is the solution quoted in "Geometric Brownian motion", and the −12σ2-\tfrac12\sigma^2−21​σ2 correction is exactly Itô's extra term. Naive calculus would have predicted a log drift of μ\muμ.

Example: S0=100S_0 = 100S0​=100, μ=8%\mu = 8\%μ=8%, σ=20%\sigma = 20\%σ=20%. The log price drifts at 0.08−12⋅0.22=0.060.08 - \tfrac12 \cdot 0.2^2 = 0.060.08−21​⋅0.22=0.06 per year, not 0.080.080.08. Over T=10T = 10T=10 years the centre of the log price is ln⁡100+0.6\ln 100 + 0.6ln100+0.6, which corresponds to a median price of 100 e0.6≈182.21100\,e^{0.6} \approx 182.21100e0.6≈182.21. The naive line ln⁡100+0.8\ln 100 + 0.8ln100+0.8 would point to 100 e0.8≈222.55100\,e^{0.8} \approx 222.55100e0.8≈222.55, which is the mean price, not where a typical path ends.

Worked example

Median and mean of a stock price from Itô's lemma

  1. Take S0=100S_0 = 100S0​=100, μ=10%\mu = 10\%μ=10%, σ=30%\sigma = 30\%σ=30% and T=5T = 5T=5. Drift of the log price per year.

    μ−12σ2\displaystyle \mu - \tfrac12\sigma^2μ−21​σ2=0.055
  2. Median price after five years: the centre of the log price, exponentiated.

    S0 e(μ−12σ2)T\displaystyle S_0\,e^{(\mu - \frac12\sigma^2)T}S0​e(μ−21​σ2)T=131.65
  3. Mean price after five years.

    S0 eμT\displaystyle S_0\,e^{\mu T}S0​eμT=164.87
  4. Ratio of mean to median: the size of the Itô correction over the whole horizon.

    e12σ2T\displaystyle e^{\frac12\sigma^2 T}e21​σ2T=1.2523

Size of the correction

Take one day, Δt=1/252\Delta t = 1/252Δt=1/252, with σ=20%\sigma = 20\%σ=20%. The random part of the return, σ ΔW\sigma\,\Delta WσΔW, is typically about 0.2×1/252≈1.26%0.2 \times \sqrt{1/252} \approx 1.26\%0.2×1/252​≈1.26%. Its square is about σ2Δt≈0.016%\sigma^2 \Delta t \approx 0.016\%σ2Δt≈0.016%, the same order of magnitude as the daily drift μ Δt≈0.032%\mu\,\Delta t \approx 0.032\%μΔt≈0.032%. Adding up such squares day after day does not average out, because they are never negative. That is why the second-order term changes the drift and cannot be ignored.

Summary

  • An Itô process moves by dX=a dt+b dWdX = a\,dt + b\,dWdX=adt+bdW: a drift step plus a random step of size about bdtb\sqrt{dt}bdt​.
  • Squared Brownian increments add up to elapsed time: (dW)2=dt(dW)^2 = dt(dW)2=dt, while dt dWdt\,dWdtdW and (dt)2(dt)^2(dt)2 vanish.
  • Itô's lemma: df=(ft+afx+12b2fxx) dt+bfx dWdf = (f_t + a f_x + \tfrac12 b^2 f_{xx})\,dt + b f_x\,dWdf=(ft​+afx​+21​b2fxx​)dt+bfx​dW. The term 12b2fxx\tfrac12 b^2 f_{xx}21​b2fxx​ is new compared with ordinary calculus.
  • Applied to ln⁡S\ln SlnS under GBM it gives dln⁡S=(μ−12σ2) dt+σ dWd\ln S = (\mu - \tfrac12\sigma^2)\,dt + \sigma\,dWdlnS=(μ−21​σ2)dt+σdW.

The next lesson, "Change of measure and Girsanov's theorem", shows how the drift μ\muμ in this solution is replaced by rrr for pricing; "Monte Carlo option pricing" then uses the resulting formula to draw terminal stock prices and estimate option prices by averaging.

Try itCompare the corrected and naive drift of the log price in the Itô Process lab →
2 questions on this lesson at the end of the series →
← PreviousThe Itô integralNext →Kolmogorov equations and the Feynman–Kac formula
Connections
Itô's lemma
Open the full graph →
Labs for this lesson
Itô ProcessBrownian Motion