Module contents
Lesson 24 of 31Core 115 min

The Itô stochastic integral

Construct integration against Brownian motion from discrete martingale transforms and adapted simple integrands, prove Itô's isometry, extend by density to L², and compare Itô and Stratonovich conventions.

After this lesson you can

  • Explain why a tag-independent Riemann-Stieltjes integral does not generally exist pathwise against Brownian motion.
  • Construct the Itô integral for simple integrands and prove the isometry.
  • Calculate ∫ B dB from the definition and numerically check that it equals (B_t² − t)/2.
  • Compare Itô, Stratonovich and right-endpoint sums numerically and relate their differences to quadratic variation.
  • Identify drift, diffusion and quadratic variation of an Itô process.

Before you start

Gains before knowing the next move

A strategy holding HtH_t units of an asset priced BtB_t earns approximately Hti(Bti+1−Bti)H_{t_i}(B_{t_{i+1}}-B_{t_i}) over a short interval. The position must be chosen with information available at the beginning of the interval. When refining the grid, the point at which we evaluate HH is not innocuous: Brownian motion has positive quadratic variation.

In the first experiment use the same path and compare left, middle and right evaluations. The intermediate control value is interpolated between each interval’s endpoints: it does not claim to reveal the actual Brownian value at that time.

InteractiveThe evaluation point changes the sum

One path is simulated on 1,024 intervals; the selected grid reuses a nested subset of those nodes. Both curves are finite linear interpolations.

  • Fine grid
  • Selected grid

Left, midpoint and right sums for each grid 2ᵏ. The point highlights the current λ; dashed lines are the three theoretical limits with T=1.

  • Left
  • Midpoint
  • Right
  • Sum with λ

In this figure the sum is Σ[(1−λ)Bᵢ+λBᵢ₊₁]ΔBᵢ. The value between endpoints is interpolated; it is not the actual Brownian value at an interior time. Choosing λ>0 uses the future endpoint and does not represent a position known at the start of the interval.

The identity is exact on every grid: Sλ=B₁²/2+(λ−1/2)Σ(ΔBᵢ)². Since quadratic variation converges to 1, the limits are (B₁²−1)/2 for Itô, B₁²/2 for Stratonovich and (B₁²+1)/2 for right endpoints. The figure only reaches finite resolution; it does not establish the limit alone.

5
0
1
Grid intervals32
Grid quadratic variation0.9970
Sum with λ−0.1715
Limit associated with λ−0.1730
Itô: left−0.1730
Stratonovich: midpoint0.3270
Right0.8270
Refine one path and observe how quadratic variation separates the limits.

Infinite total variation prevents straightforward application of general Riemann-Stieltjes theory with a bounded-variation integrator. It does not mean every classical integral against a Brownian path fails: for example, with constant integrand one, sums telescope to BTB_T. However, for H=BH=B left- and right-tagged sums have different limits, precluding a tag-independent classical integral.

From predictable sums to an integral

A simple integrand adapted to a partition 0=t0<⋯<tn=T0=t_0<\cdots<t_n=T has the form

Hs=∑i=0n−1Hi1(ti,ti+1](s),Hi∈Fti,H_s=\sum_{i=0}^{n-1}H_i\mathbf1_{(t_i,t_{i+1}]}(s), \qquad H_i\in\mathcal F_{t_i},

where each HiH_i is square integrable. Its Itô integral is defined as IT(H)=∑iHiΔBiI_T(H)=\sum_i H_i\Delta B_i. It is the continuous version of the martingale transform: HiH_i may depend on the past, but not on the future increment. A random constant BTB_T used from time zero does not satisfy this condition in the natural filtration, even if integrable.

The Itô isometry states

E ⁣[(∫0THs dBs)2]=E ⁣∫0THs2 ds.E\!\left[\left(\int_0^T H_s\,dB_s\right)^2\right] =E\!\int_0^T H_s^2\,ds.

For a simple integrand, expanding the square makes cross terms vanish. If i<ji<j, product HiΔBiHjH_i\Delta B_iH_j is Ftj\mathcal F_{t_j}-measurable and E(ΔBj∣Ftj)=0E(\Delta B_j\mid\mathcal F_{t_j})=0. Diagonal terms equal E[Hi2] ΔtiE[H_i^2]\,\Delta t_i. Thus the equality holds for the sum and, by linearity, for differences of sums.

If HH is progressively measurable and E∫0THs2ds<∞E\int_0^T H_s^2ds<\infty, approximate it by adapted simple integrands in norm L2(Ω×[0,T])L^2(\Omega\times[0,T]). The isometry turns a Cauchy sequence of integrands into one of integrals in L2(Ω)L^2(\Omega); completeness provides the limit and makes it independent of the approximation. This construction identifies processes equal almost everywhere with respect to P⊗dtP\otimes dt. See assumptions and the density proof in Salez’s notes.

InteractiveIsometry across many paths

Each bar counts paths by I = Σ H(tᵢ) ΔBᵢ, evaluating H at the left endpoint. The window cuts approximately 0.5% of observations in each tail to show the body; all values, including extremes, contribute to the figures.

839−0.681.423.53
Discrete integral · outside window: 29 de 3000

The isometry says E(I²) = E Σ H(tᵢ)² Δt for this adapted discrete sum. Compare the two empirical means and their theoretical reference; they need not agree exactly in a finite sample.

Mean I²0.495Mean energy0.499Theoretical grid expectation0.492

Sample variance subtracts the squared mean and uses divisor n−1; the blue bar uses the uncentered second moment. The difference and its standard error are calculated from paired I² − ΣH²Δt values on each path. The theoretical mean of I is zero, but a simulated mean may differ by chance; no standard error guarantees a particular sample.

Model: 3000 independent standard Brownian paths on [0,1], generated with 256 increments N(0,1/256); coarser grids retain those nodes. H is calculated before the increment. We use sign(0) = 0; hence on a finite grid, theoretical sign energy is (n−1)/n and tends to 1. For exp(Bₜ), E∫₀¹ exp(2Bₜ)dt = (e²−1)/2 is finite, but its tails produce large fluctuations and estimated standard errors may be unstable. Bars use the exact expectation of the sum on the chosen grid, not its continuous limit.

64
Mean I0.005
Standard error of mean0.013
Sample variance of I0.495
I² minus energy difference−0.004
Standard error of difference0.026
Paths3000
Seed2624
Compare variance of sums with energy of the same integrand and grid.

Martingale, energy and localization

For progressive HH with finite expected energy, the process of partial integrals is a continuous square-integrable Itô martingale. Its quadratic variation is

[∫0⋅Hs dBs]t=∫0tHs2 ds.\left[\int_0^\cdot H_s\,dB_s\right]_t=\int_0^t H_s^2\,ds.

Doob’s maximal inequality gives Esup⁡t≤T∣It(H)∣2≤4E∫0THs2dsE\sup_{t\le T}|I_t(H)|^2\le4E\int_0^T H_s^2ds. Do not confuse this quadratic variation, which is random if HH is, with the variance of the final integral, which is its expectation.

A local martingale is a process that becomes a martingale when stopped at a sequence of times tending to infinity almost surely. If HH is progressive and ∫0THs2ds<∞\int_0^T H_s^2ds<\infty almost surely for each TT, the integral can be constructed by localization and is a local martingale. Lack of finite expected energy removes a sufficient condition for a true martingale, but alone does not prove it fails.

There is a concrete counterexample: if RtR_t is the norm of a three-dimensional Brownian motion started one unit from the origin, 1/Rt1/R_t is a strict local martingale. Itô’s formula, studied later, gives dRt=dβt+Rt−1dtdR_t=d\beta_t+R_t^{-1}dt and d(1/Rt)=−Rt−2dβtd(1/R_t)=-R_t^{-2}d\beta_t, with β\beta Brownian: the process is one plus a driftless local integral. Its expectation is 2Φ(1/t)−1<12\Phi(1/\sqrt t)-1<1 for t>0t>0, so it is not a martingale. Stopping before RR approaches zero too closely recovers bounded martingales; that stopping cannot be removed without justifying uniform integrability. The property and expectation are described in the analysis of the inverse Bessel process.

The term missing from ordinary calculus

For a partition, (Bti+1)2−(Bti)2=2BtiΔBi+(ΔBi)2(B_{t_{i+1}})^2-(B_{t_i})^2=2B_{t_i}\Delta B_i+(\Delta B_i)^2. Summing and using the quadratic variation of BB,

∫0TBs dBs=BT2−T2.\int_0^T B_s\,dB_s=\frac{B_T^2-T}{2}.

On a uniform grid of nn intervals, the difference between the left sum and its limit is (T−Qn)/2(T-Q_n)/2. Its mean squared error is T2/(2n)T^2/(2n): this equality applies to this simulation and integrand, not a universal rate for arbitrary integrands. The right sum differs from the left by exactly QnQ_n.

Stratonovich and Itô processes

The Stratonovich integral is obtained, under appropriate assumptions, as a limit in probability of symmetric sums. If HH and BB are continuous semimartingales,

∫0THs∘dBs=∫0THs dBs+12[H,B]T.\int_0^T H_s\circ dB_s =\int_0^T H_s\,dB_s+\frac12[H,B]_T.

For example, for H=BH=B, [B,B]T=T[B,B]_T=T and ∫B∘dB=BT2/2\int B\circ dB=B_T^2/2. For H=f(B)H=f(B) with f∈C2f\in C^2 and suitable local conditions, [f(B),B]T=∫0Tf′(Bs)ds[f(B),B]_T=\int_0^T f'(B_s)ds. This formula does not define conversion for an arbitrary integrand L2L^2 without appropriate covariation. In physics Stratonovich often appears when studying smooth approximations; in finance Itô is common for predictable positions. The choice depends on the model and how it is obtained, not just the field’s name.

An Itô process has the form

Xt=X0+∫0tbs ds+∫0tσs dBs,[X]t=∫0tσs2 ds,X_t=X_0+\int_0^t b_s\,ds+\int_0^t\sigma_s\,dB_s, \qquad [X]_t=\int_0^t\sigma_s^2\,ds,

under the corresponding measurability and integrability conditions. bb is drift and σ\sigma diffusion; in multiple dimensions the covariation matrix also depends on correlations between noise sources. Itô’s formula for functions of XX is the next step.

Gains of a self-financing portfolio connect with dynamic derivatives hedging, once assets, funding and costs are modeled. Equations of diffusion models also require the stochastic convention to be stated when interpreting their drift.

InteractiveA strategy does not know the future increment

Price B on [0, 1]: each increment is independent normal with variance 1/64. The first path and the 1200 gains are generated by the same rule for each strategy.

  • Brownian price
  • Cumulative gain

Distribution of final gain across 1200 independent paths.

For trend following, the position is the sign of the last observed change; for reversion it is the opposite. In the first interval both positions are zero. Positions are between −1 and 1 and each is decided before the increment that pays it: exact expected gains are zero, although a finite-sample mean fluctuates.

The anticipative control uses the sign of the increment that has not yet occurred and earns its absolute value in each interval. It is not a predictable strategy or an admissible Itô integral. On this grid its expectation is √(2n/π), with n=64: it grows with refinement because it assumes knowledge of every future move. The displayed standard error estimates uncertainty of the Monte Carlo mean, not dispersion of a single path.

Position in each interval
6
Increments per path64
Paths1200
Observed mean gain0.0031
Standard error of mean0.0279
Theoretical expectation0.0000
Seed2624
Compare predictable positions with a rule that improperly uses the next move.

Lab: sums on the same paths

We generate fine increments and obtain coarser grids by summing them. Thus error at different resolutions is measured on the same paths and is not confused with changing the sample.

[ ]Itô, symmetric and right sumsBrowser
import numpy as np
from scipy.stats import norm

rng=np.random.default_rng(2624)
T=1.; nmax=1024; replicas=3000
dW=rng.normal(0,np.sqrt(T/nmax),size=(replicas,nmax))
B=np.column_stack((np.zeros(replicas),np.cumsum(dW,axis=1)))
limite=(B[:,-1]**2-T)/2
escalas=[]; errores=[]
for n in (8,16,32,64,128,256,512,1024):
    paso=nmax//n
    nodos=B[:,::paso]; delta=np.diff(nodos,axis=1)
    izquierda=np.sum(nodos[:,:-1]*delta,axis=1)
    derecha=np.sum(nodos[:,1:]*delta,axis=1)
    simetrica=(izquierda+derecha)/2
    mse=np.mean((izquierda-limite)**2)
    escalas.append(n); errores.append(mse)
    if paso>=2:
        medios=B[:,paso//2::paso]
        centro=np.sum(medios*delta,axis=1)
        error_centro=np.mean((centro-B[:,-1]**2/2)**2)
    else:
        error_centro=None
    print("n, ECM izquierdo y teórico, error simétrico máximo, ECM de centro real y teórico:",
          n,mse,T*T/(2*n),np.max(abs(simetrica-B[:,-1]**2/2)),
          error_centro,T*T/(4*n) if paso>=2 else None)
pendiente=np.polyfit(np.log(escalas),np.log(errores),1)[0]
print("pendiente observada de log ECM frente a log n:",pendiente)

This cell’s symmetric point averages integrand values at both endpoints. For H=BH=B it gives the exact trapezoidal identity on any grid; the left sum converges to a different quantity. We also calculate a sum using the actual Brownian value at the temporal midpoint, obtained from the fine grid. If LiL_i and RiR_i are the increments of the two halves, its difference from the trapezoidal sum is 12∑i(Li2−Ri2)\frac12\sum_i(L_i^2-R_i^2) and has MSE T2/(4n)T^2/(4n). At the finest resolution no intermediate points are available. The estimated left-sum MSE slope varies by sample; the theoretical formula gives slope −1 against nn, or −1/2 for root MSE.

Now we estimate the isometry for several adapted integrands. Both quantities use the same left grid. The sample mean may not be exactly zero and the comparison has Monte Carlo uncertainty; eBse^{B_s} produces more variable tails.

[ ]Energy and variance on a gridBrowser
pasos=256; nodos=B[:,::nmax//pasos]
delta=np.diff(nodos,axis=1); anteriores=nodos[:,:-1]
t=np.arange(pasos)*T/pasos
integrandos={"B":anteriores, "tiempo":np.broadcast_to(t,anteriores.shape),
             "signo":np.sign(anteriores), "exponencial":np.exp(anteriores)}
for nombre,H in integrandos.items():
    integral=np.sum(H*delta,axis=1)
    energia=np.sum(H*H,axis=1)*T/pasos
    diferencia=integral**2-energia
    print(nombre,"media, error estándar de la media, segundo momento, energía:",
          integral.mean(),integral.std(ddof=1)/np.sqrt(replicas),
          np.mean(integral**2),energia.mean())
    print("diferencia emparejada y su error estándar:",
          diferencia.mean(),diferencia.std(ddof=1)/np.sqrt(replicas))

H=anteriores
parciales=np.cumsum(H*delta,axis=1)
inicio=parciales[:,pasos//2-1]
posterior=parciales[:,-1]-inicio
grupo=posterior[inicio>0]
print("incremento posterior medio dado integral intermedia positiva, error estándar:",
      grupo.mean(),grupo.std(ddof=1)/np.sqrt(len(grupo)))

For H=eBH=e^B, we compare the difference between symmetric and left sums with approximate covariation ∫eBsds\int e^{B_s}ds. Both use the same nodes: convergence does not mean the finite sums are identical.

[ ]Conversion on one sampleBrowser
for n in (16,64,256,1024):
    nodos=B[:,::nmax//n]; delta=np.diff(nodos,axis=1)
    H=np.exp(nodos)
    ito=np.sum(H[:,:-1]*delta,axis=1)
    sim=np.sum((H[:,:-1]+H[:,1:])*delta/2,axis=1)
    correccion=np.sum(H[:,:-1],axis=1)*T/(2*n)
    print("n y error cuadrático medio de conversión:",
          n,np.mean((sim-ito-correccion)**2))

The inverse Bessel example can be checked at one time without simulating an entire path: RtR_t is the norm of a shifted three-dimensional Gaussian vector. The following average is an estimate and may fluctuate, especially due to values near the origin.

[ ]A strict local martingaleBrowser
z=rng.normal(size=(100000,3))
z[:,0]+=1.
inverso=1/np.linalg.norm(z,axis=1)
print("esperanza muestral, error estándar y referencia en t=1:",
      inverso.mean(),inverso.std(ddof=1)/np.sqrt(len(inverso)),2*norm.cdf(1)-1)

Exercises

ProofThe isometry for simple processes
Prove: Prove Itô isometry for simple, adapted, square-integrable H.
0
Write I=Σ HᵢΔBᵢ with Hᵢ measurable with respect to Fₜᵢ.

Step 1 of 3. For i<j, why does E[HᵢΔBᵢHⱼΔBⱼ] vanish?

ProofCalculate ∫B dB
Prove: Calculate the integral of B against itself from left sums.
0
Use a uniform partition of [0,T] with Qₙ=Σ(ΔBᵢ)².

Step 1 of 2. Which exact identity holds on each interval?

NumericVariance with a deterministic integrand
Calculate the variance of ∫₀² s dBₛ. Give three decimal places.
NumericSecond moment with a random integrand
Calculate E[(∫₀¹ Bₛ dBₛ)²].
QuizAvailable information
With respect to the natural filtration of B on [0,1], which integrand fails the adaptation condition before time 1?
CodeTwo conventions on a grid
Implement ito_sum(H,B,dt) with left endpoints and stratonovich_sum(H,B,dt) with the average of H endpoints. H and B have n+1 values on a uniform grid and dt is its positive step. Return the sums; reject incompatible sizes and nonfinite data.
import numpy as np

def ito_sum(H,B,dt):
  pass

def stratonovich_sum(H,B,dt):
  pass
Shift+Enter to run

In these sums the time step identifies the grid and allows its positivity to be checked; increments of BB are already included in the input. In the limit, endpoint averaging approximates Stratonovich under the assumptions stated above.

Key idea

The Itô integral preserves predictable information and is constructed in L2L^2 through its isometry. Quadratic variation explains why left and symmetric conventions produce different results.

Check the numerical exercises after attempting them.

[ ]Exercise checkBrowser
print("varianza con H=s hasta 2:",2**3/3)
print("segundo momento con H=B hasta 1:",1/2)