Itô's lemma
Itô's stochastic chain rule adds a second-order quadratic-variation term. Derive one- and multidimensional formulas and the product rule, solve geometric Brownian motion, construct the stochastic exponential and state Lévy's characterization.
After this lesson you can
- Derive Itô's lemma from Taylor expansion with dB² = dt and justify which terms vanish.
- Solve geometric Brownian motion and explain the −σ²/2 correction and falling typical paths alongside a rising mean.
- Apply the multidimensional lemma to correlated Brownian motions, quotients and products.
- Calculate moments of Brownian functionals using Itô and expectations.
- Identify local martingales from the absence of a dt term and verify conditions for true martingales.
Before you start
Curvature also produces drift
Log wealth, particle energy and a function of parameters subject to noise are transformations of random processes. In ordinary calculus, following would only require multiplying the change in by the derivative. For a process with Brownian noise, squared increments accumulate a contribution that does not vanish.
In the figure compare the observed transformation with the sum using only the derivative and the one including the second-order correction. For the logarithm a strictly positive process is used: is undefined when Brownian motion is negative.
A different chain rule
Let , with progressive coefficients satisfying local integrability conditions, and let on a domain containing the path through the time considered. Itô’s lemma states
The intuition comes from Taylor: , and summing squares over a partition, the quadratic variation of makes . By contrast, products with and higher time-order terms vanish under suitable assumptions. The symbolic table , summarizes these limits; it does not claim is an ordinary differential.
To justify the step, first prove it with simple bounded coefficients and localize the path in compact sets controlling derivatives of . Sum Taylor expansions, control the remainder using continuity and maximum increment size, and apply limits of quadratic variation and stochastic sums. General progressive coefficients are reached by approximation in corresponding integrability norms and localization; stopping the path in a compact set alone does not bound arbitrary progressive coefficients. The statement and conditions are developed in Särkkä and Solin, chapter 4, and Salez’s notes. Itô presented the stochastic integral against Brownian motion in 1944.
Specifically, for bounded simple diffusion on each interval, centered terms are orthogonal martingale differences. Their total second moment is
Thus the sum of squares converges to that diffusion’s energy. Approximation in and localization extend the argument to the admissible coefficient. The drift’s quadratic contribution vanishes and the cross term is controlled by Cauchy-Schwarz. Uniform continuity of derivatives on the localized domain controls the Taylor remainder. This is why exactly half the second derivative multiplied by quadratic variation survives.
For example, with and , . For , appears: omitting this term is the error made by directly applying the ordinary rule.
Two noise sources and their cross terms
For a continuous Itô vector and , the multidimensional lemma is
If , and , the two symmetric cross terms sum to , not half that amount. The product rule follows with :
The domain still matters: a quotient’s denominator must not vanish; a Euclidean norm is also not at the origin. The interactive uses a positive denominator and regularized norm to avoid applying the formula at a singularity.
Mean, median and typical growth
Geometric Brownian motion satisfies with and constant parameters. Applying Itô to and solving,
With and the expectation grows while the median falls. Moreover, since almost surely, almost surely if . This is an asymptotic limit: with the model remains strictly positive at every finite time. Rising expectation and typical behavior are compatible because the mean gives substantial weight to a tail of large paths. For and ,
At the strict probability is zero; if , the path is deterministic and the previous expression does not apply either. Results are conditional on the model, not a prediction of real returns.
Exponentials and recognizing martingales
For a continuous local martingale with , its stochastic exponential is
It is a positive local martingale, not necessarily a true martingale. If , the Novikov condition is sufficient for it to be a martingale on horizon ; it is not necessary in every case. Zero drift obtained through Itô generally identifies a local martingale; constant expectations require checking integrability or another sufficient condition.
Lévy’s characterization states that a continuous local martingale , with and , is Brownian motion relative to the corresponding filtration. Quadratic variation alone is insufficient: also has , but is neither a martingale nor standard Brownian motion. The martingale assumption is essential; see the proof in Salez’s notes.
For continuous semimartingales, Stratonovich incorporates covariation and recovers the ordinary chain rule under appropriate regularity. Converting the equation changes drift: conventions cannot be swapped while keeping coefficients unchanged. This distinction appears in both Black-Scholes and generative model diffusion equations.
The difference between expected and logarithmic growth also connects with the Kelly criterion: the optimal rule depends on dynamics, information and strategy constraints, not only the asset mean.
Symbolic lab and simulation
We implement the lemma for symbolic , drift and diffusion . Derivatives are calculated with SymPy; a formal expression alone does not verify that domains and integrability conditions are valid.
import numpy as np
import sympy as sp
from scipy.stats import norm
t,x=sp.symbols("t x",real=True)
def ito_drift_diffusion(f,b,sigma):
deriva=sp.diff(f,t)+b*sp.diff(f,x)+sigma**2*sp.diff(f,x,2)/2
ruido=sigma*sp.diff(f,x)
return sp.simplify(deriva),sp.simplify(ruido)
for f in (x**2,x**4,sp.exp(x),sp.log(x)):
print("f, deriva y difusión para dX=dB:",f,ito_drift_diffusion(f,0,1))For the first two moments there is no need to simulate time grids: is drawn directly from its normal law. Standard error describes estimator variation in these replicates; it does not guarantee all future estimates will lie within a given interval.
rng=np.random.default_rng(2625)
m=120000
for tiempo in (.5,1.):
b=rng.normal(0,np.sqrt(tiempo),m)
for nombre,valor,referencia in [
("B⁴",b**4,3*tiempo**2),
("exp(B)",np.exp(b),np.exp(tiempo/2))
]:
print("t, función, media, error estándar, referencia:",
tiempo,nombre,valor.mean(),valor.std(ddof=1)/np.sqrt(m),referencia)For geometric Brownian motion we can directly simulate its exact solution. We compare expectation, median and frequency below the initial value with the formulas in the previous section.
S0=80.; mu=.06; sigma=.5; T=1.
z=rng.normal(size=m)
S=S0*np.exp((mu-sigma**2/2)*T+sigma*np.sqrt(T)*z)
print("media empírica, error estándar y teórica:",
S.mean(),S.std(ddof=1)/np.sqrt(m),S0*np.exp(mu*T))
print("mediana empírica y teórica:",
np.median(S),S0*np.exp((mu-sigma**2/2)*T))
print("frecuencia bajo S0 y probabilidad teórica:",
np.mean(S<S0),norm.cdf((sigma**2/2-mu)*np.sqrt(T)/sigma))The next experiment uses two correlated Brownian motions. The product equality is exact on each grid if the product of increments is retained; under refinement their sum converges to . Standard error comes from simulated paths, not a figure chosen for the plot.
replicas=5000; n=128; rho=.6; dt=1/n
z1=rng.normal(size=(replicas,n))
z2=rng.normal(size=(replicas,n))
dx=np.sqrt(dt)*z1
dy=np.sqrt(dt)*(rho*z1+np.sqrt(1-rho**2)*z2)
X=np.column_stack((np.zeros(replicas),np.cumsum(dx,axis=1)))
Y=np.column_stack((np.zeros(replicas),np.cumsum(dy,axis=1)))
cruzada=np.sum(dx*dy,axis=1)
producto=np.sum(X[:,:-1]*dy+Y[:,:-1]*dx,axis=1)+cruzada
print("error máximo identidad discreta:",np.max(abs(producto-X[:,-1]*Y[:,-1])))
print("covariación media, error estándar y referencia:",
cruzada.mean(),cruzada.std(ddof=1)/np.sqrt(replicas),rho)Exercises
Step 1 of 3. What differential do you obtain for Bₜ²ᵏ?
Step 1 of 3. What is the differential of log S before any possible exit from the positive domain?
import sympy as sp
t,x=sp.symbols("t x",real=True)
def ito_drift_diffusion(f,mu,sigma):
passTaylor’s second order survives because of quadratic variation. Drift of the transformed function, cross terms and the distinction between local and true martingales determine the conclusions you can draw.
After attempting the numerical exercise, check its value.
print("mediana para S0=100, mu=0.05, sigma=0.4, t=1:",
100*np.exp(.05-.4**2/2))