2.4
The Itô integral
Left-endpoint sums and why (non-anticipation); ∫W dW = ½W_T² − ½T; zero mean, martingale, Itô isometry; Stratonovich as an aside.
In 2.3 we discovered that Brownian motion pays a fixed price, , in quadratic variation. Here we see the consequence: the three natural Riemann sums for don't agree, and the amount by which they disagree is exactly that , or half of it. The page shows how each choice shifts the limit, why the midpoint one gives the chain-rule answer, and why finance forces the left-endpoint version — the only one that doesn't sneak a look into the future.
The experiment — what was done
400 Brownian paths were each drawn once at a very fine resolution — two million steps — so that every grid the page cares about (, , , , ) could be read off that same underlying path without interpolation. On each grid the code formed three sums:
- left: at the start of each step times the step's increment,
- mid: at the true midpoint (taken from the pre-drawn path),
- right: at the end of the step.
It also computed on each grid. That gave five readings of the same path at increasing resolution, letting you watch each sum settle and see how the gaps behave. Four more of the paths are shown at to show the pattern is not limited to path 1. A second experiment drew 20,000 fresh paths at to measure expectations and mean-square behaviour. Two controls — a smooth curve and the coin walk — were run on the same grids to show what happens when quadratic variation vanishes or is exact.
- W(T)
- 0.2388
- Σ(ΔW)²
- 0.9799T = 1
- left-endpoint sum
- −0.4614
- ½W_T² − ½T
- −0.4715
- midpoint sum
- 0.0262
- ½W_T²
- 0.0285
- left − Itô limit
- 0.01000.9 sd
- midpoint − Itô limit
- 0.4977½T = 0.50
Refine the partition and the left-endpoint sum closes on ½W_T² − ½T — its distance is exactly half the quadratic variation's distance from T, so it shrinks like 1/√n. The midpoint sum does not close on it and never will: it converges to ½W_T², a fixed ½T higher, whatever n you choose. The midpoint is sampled from the path itself, at twice the resolution, rather than averaged from the endpoints — averaging would produce the Stratonovich answer by construction and prove nothing.
Reading the path-1 table — what we observed
Path 1 ends at .
The first path of the ensemble — 400 paths drawn once on a grid of two million
steps over and coarsened, so every row is that one path read on a
different grid and never interpolated. Seed 20260908, from the committed
experiments/2_4_ito_integral.json
(grids[*].first_paths.{left,mid,right,sum_dW_sq}[0]; the last row's three
targets are half_WT_sq_minus_half_T[0], half_WT_sq[0] and
half_WT_sq_plus_half_T[0], and ).
| left | mid | right | |||
|---|---|---|---|---|---|
| 100 | 0.2595 | 0.7751 | 1.3334 | 1.0739 | |
| 1,000 | 0.2799 | 0.7725 | 1.3131 | 1.0332 | |
| 10,000 | 0.2993 | 0.7967 | 1.2936 | 0.9943 | |
| 100,000 | 0.2993 | 0.7980 | 1.2937 | 0.9944 | |
| 1,000,000 | 0.2975 | 0.7959 | 1.2955 | 0.9980 | |
Four more paths at :
The next four paths of the same ensemble, at the finest grid only, from
grids[4].first_paths.*[1..4] of the same file.
| path | left | mid | right | ||||
|---|---|---|---|---|---|---|---|
| 2 | −0.9467 | −0.0512 | −0.0518 | 0.4482 | 0.4482 | 0.9476 | 0.9482 |
| 3 | 1.9795 | 1.4594 | 1.4592 | 1.9589 | 1.9592 | 2.4589 | 2.4592 |
| 4 | −0.8526 | −0.1357 | −0.1365 | 0.3638 | 0.3635 | 0.8627 | 0.8635 |
| 5 | 1.0056 | 0.0051 | 0.0056 | 0.5053 | 0.5056 | 1.0061 | 1.0056 |
As the grid is refined from up to , each of the three sums moves toward its own fixed number. The left sum settles at , the midpoint sum settles near , and the right sum settles near . Nothing converges to a common value; each stabilises at a different target.
At every grid size, the three numbers sit in a rigid pattern. The right sum is always higher than the left by exactly , and the midpoint sits near halfway between them, closing on halfway as the grid is refined. Refining the grid doesn't shrink these gaps — it only makes them more precise. The differences are already the quadratic variation at and remain so all the way to .
Path 5 is the clearest illustration. It ends at , so the chain rule would suggest an answer near . But the left sum is 0.005 — essentially zero. The path climbed by one, but it also paid in quadratic variation, and the Itô identity subtracts half of that. Path 5 shows in one line why is not "area under the curve": the quadratic variation cancels almost all of the apparent gain.
Why — the identity, the telescoping, the three rearrangements
Start from the one-step expansion you wrote in 2.3 for :
Solve it for the term this page cares about:
Now add that over the grid. The bracket telescopes: every appears once with a plus and once with a minus except the ends, leaving . Nothing of the path's interior survives in that part — only the endpoint. The second piece is just . So on every grid,
That is the left-endpoint identity.
For the right endpoint, write . Then
so summing gives
For the midpoint, split each step into two half-steps with increments and , so and . The same algebra leaves
the difference of the two half-step quadratic variations. That difference is the only thing that survives the rearrangement.
Three formulas, all exact on every grid, all checked in the JSON to machine precision.
The limit — why the three answers differ by ½T and T
Now let . Section 2.3 has already established the one fact the page needs:
Plug that into the three identities:
- Left: .
- Midpoint: each half-step grid carries half the quadratic variation, so , , and their difference dies. Thus .
- Right: .
Three limits, spaced by exactly and . Those gaps are not discretisation error; they are the quadratic variation itself.
For a smooth curve , the same identities hold with in place of , but now . All three sums collapse to the chain-rule value ( starting at 0, as does). That contrast — "Brownian: three answers; smooth: one answer" — is the whole difference between stochastic calculus and ordinary calculus in one line.
Zero mean — why the left sum is a martingale and the right sum isn't
A left-endpoint term is . The increment is independent of everything up to and has mean zero. So
Every term has mean zero; the whole sum has mean zero. That is why
A right-endpoint term is
The first piece still has mean zero; the second has mean . Summing of them gives
The midpoint sees half of that: .
The second run: 20,000 fresh paths at , same seed stream, from
expectations.{left,mid,right}.{mean,se} of the same file.
| sum | mean over 20,000 paths | ± s.e. | expected |
|---|---|---|---|
| left | −0.0041 | 0.0049 | 0 |
| mid | 0.4959 | 0.0049 | |
| right | 0.9960 | 0.0049 |
The running-sum table shows the same story in continuous time. The left running total has mean 0 at every , not just at . Its mean-square is . And the second half of the sum has no memory of the first — the martingale property in action. The right running total , by contrast, drifts upward at rate 1: .
The same 20,000 paths, read at four checkpoints, from
expectations.running[*].{I,I_sq,R}. The column is the limit the
mean-square is compared against, not a measurement.
| 0.25 | 0.0017 ± 0.0013 | 0.0326 ± 0.0008 | 0.0312 | 0.2517 ± 0.0013 | 0.25 |
| 0.50 | 0.0005 ± 0.0025 | 0.1251 ± 0.0031 | 0.1250 | 0.5005 ± 0.0025 | 0.50 |
| 0.75 | −0.0039 ± 0.0037 | 0.2726 ± 0.0065 | 0.2812 | 0.7460 ± 0.0037 | 0.75 |
| 1.00 | −0.0041 ± 0.0049 | 0.4839 ± 0.0118 | 0.5000 | 0.9960 ± 0.0049 | 1.00 |
Zero mean is not a convention; it is the consequence of reading the integrand at the left endpoint, where the increment is still unknown. The moment you let the integrand peek at the step, you pick up the quadratic variation and the drift appears.
The finance reason — why the integrand must be read at the left endpoint
On a trading grid, the position you hold over the step is the number of shares you chose at . You fix that position first; the price move arrives afterwards. The P&L for that step is therefore
a left-endpoint term by construction, not by convention. The integrand is the position you hold during the step, so it must be decided before the step's move is known.
If you instead use the right endpoint, you are multiplying by — a position chosen after seeing the move that generated the profit. The expectation run shows exactly what that earns:
(with , as in the experiment; in general the bonus is the quadratic variation of the price), a guaranteed gain from information nobody has. The midpoint earns half of it. Those drifts are the signature of a strategy that "peeks" at the step.
The word for the rule is adapted: the integrand may depend only on what is known at time , the filtration . The Itô integral is the left-endpoint limit because it is the only one an adapted trader can realise, and its zero mean is the mathematical statement that no such strategy has an edge on a driftless price.
Stratonovich — the midpoint limit, and why this course doesn't use it
The midpoint limit
is the Stratonovich integral, written
It obeys the ordinary chain rule because the midpoint integrand looks half a step ahead, and that half-step peek exactly cancels the quadratic-variation term that Itô keeps. For ,
holds exactly in the Stratonovich sense.
The relation between the two is
half the quadratic variation of the integrand against the driver. That extra is precisely the midpoint's "peek".
Two reasons disqualify it here. First, its integrand is not adapted — it depends on information inside the step — so no trader can hold it. Second, the expectation run shows the consequence:
a built-in drift. On this course, "" always means Itô, because Itô is the only one of the three whose integrand respects the filtration and whose expectation stays at zero.
The smooth curve — what happens when Σ(Δ·)² → 0
Take on the same five grids. Form the same three sums . The identities above hold letter-for-letter with in place of ; the only difference is the size of the increments. A step of length has
so is -sized. Summing of them gives
and on the grid the JSON reports
to five figures at and six or better from . Thus
and the gap between right and left is exactly that.
The three sums land on the chain-rule value , with the gap shrinking like :
The smooth control, on the same five grids — one curve, not an
ensemble, so there is nothing to average. From smooth[*].{left,mid,right,
gap_right_minus_left,sum_dx_sq_times_n}.
| left | mid | right | right − left | ||
|---|---|---|---|---|---|
| 100 | 0.49333 | 0.49998 | 0.50667 | 0.01333 | 1.3333 |
| 1,000 | 0.49933 | 0.50000 | 0.50067 | 0.001333 | 1.3333 |
| 10,000 | 0.499933 | 0.500000 | 0.500067 | 0.0001333 | 1.3333 |
| 100,000 | 0.4999933 | 0.5000000 | 0.5000067 | 1.3333 | |
| 1,000,000 | 0.49999933 | 0.50000000 | 0.50000067 | 1.3333 |
For a smooth curve, the quadratic variation vanishes, so all three sums collapse to the same limit. Put this table next to the Brownian one and the difference between the two calculi is visible in one column.
The coin walk — why the −½T is exact at every n
For the coin walk of 2.1, every increment is exactly . So
on every step, with no randomness at all. Summing of them gives
exactly, at as much as at .
Put that into the left-endpoint identity above:
No limit, no approximation, no spread: the Itô correction is paid in full at every grid size.
One coin path in the JSON ends at . Its left sum is
exactly. Up-and-down by one, and the integral is zero — the same story as Brownian path 5 above, but without Gaussian noise. This shows the source of the term: it is not a Gaussian artefact, not a limiting artefact, but the algebraic price of -sized steps.
Into 2.5 — what Itô's lemma is going to do with this
Section 2.4 has shown that
The chain rule would have given . The extra is the quadratic-variation term.
Itô's lemma is going to generalise that. For a smooth function , the lemma says
The term is exactly the "" phenomenon in disguise: it is the quadratic variation of being fed through the second derivative of .
For ,
so Itô's lemma gives
Integrate to :
and rearrange:
the identity you just measured on every grid.
The check you would want in 2.5 is this one, twice: for , where the two sides agree to machine precision on every grid as they did here, and for a that is not quadratic — or — where they agree only as , the third-order term from 2.3 doing the work. Draw many Brownian paths, compute
on the left, and
on the right, using the left-endpoint sum for the stochastic integral.
That is the bridge from 2.4 to 2.5: the quadratic-variation correction you have now seen numerically becomes the term in the general formula.
Check
A Brownian path on [0, 1] is chopped into n equal steps and you compute Σ W(tᵢ)·ΔWᵢ with W read at the start of each step. As n → ∞ it tends to:
Same path, same grids, but now W is read at the midpoint of each step, or at the end. As n → ∞, compared with the left-endpoint sum:
E[Σ W(tᵢ)·ΔWᵢ] for the left-endpoint sum is:
In finance the integrand of ∫h dS is always read at the left endpoint of each step. Why?
E[(∫₀ᵀ W dW)²] — the mean-square of the Itô integral — equals: