In 2.3 we discovered that Brownian motion pays a fixed price, TT, in quadratic variation. Here we see the consequence: the three natural Riemann sums for ∫W dW\int W \,\dW don't agree, and the amount by which they disagree is exactly that TT, 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 (10210^2, 10310^3, 10410^4, 10510^5, 10610^6) could be read off that same underlying path without interpolation. On each grid the code formed three sums:

  • left: WW at the start of each step times the step's increment,
  • mid: WW at the true midpoint (taken from the pre-drawn path),
  • right: WW at the end of the step.

It also computed ∑(ΔW)2\sum (\Delta W)^2 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 n=106n = 10^6 to show the pattern is not limited to path 1. A second experiment drew 20,000 fresh paths at n=104n = 10^4 to measure expectations and mean-square behaviour. Two controls — a smooth curve and the ±dt\pm\sqrt{\dt} coin walk — were run on the same grids to show what happens when quadratic variation vanishes or is exact.

D3Itô integral: left-endpoint vs midpoint
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 WT=1.2621W_T = 1.2621.

Path 1 on five grids

The first path of the ensemble — 400 paths drawn once on a grid of two million steps over [0,1][0, 1] 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 T=1T = 1).

nndt\dtleftmidright∑(ΔW)2\sum (\Delta W)^2
10010−210^{-2}0.25950.77511.33341.0739
1,00010−310^{-3}0.27990.77251.31311.0332
10,00010−410^{-4}0.29930.79671.29360.9943
100,00010−510^{-5}0.29930.79801.29370.9944
1,000,00010−610^{-6}0.29750.79591.29550.9980
n→∞n \to \infty12WT2−12T=0.2965\tfrac12 W_T^2 - \tfrac12 T = 0.296512WT2=0.7965\tfrac12 W_T^2 = 0.796512WT2+12T=1.2965\tfrac12 W_T^2 + \tfrac12 T = 1.2965T=1T = 1

Four more paths at n=106n = 10^6:

Paths 2 to 5, finest grid

The next four paths of the same ensemble, at the finest grid only, from grids[4].first_paths.*[1..4] of the same file.

pathWTW_Tleft12WT2−12T\tfrac12 W_T^2 - \tfrac12 Tmid12WT2\tfrac12 W_T^2right12WT2+12T\tfrac12 W_T^2 + \tfrac12 T
2−0.9467−0.0512−0.05180.44820.44820.94760.9482
31.97951.45941.45921.95891.95922.45892.4592
4−0.8526−0.1357−0.13650.36380.36350.86270.8635
51.00560.00510.00560.50530.50561.00611.0056

As the grid is refined from n=100n = 100 up to n=1,000,000n = 1{,}000{,}000, each of the three sums moves toward its own fixed number. The left sum settles at 12WT2−12T\tfrac12 W_T^2 - \tfrac12 T, the midpoint sum settles near 12WT2\tfrac12 W_T^2, and the right sum settles near 12WT2+12T\tfrac12 W_T^2 + \tfrac12 T. 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 ∑(ΔW)2\sum (\Delta W)^2, 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 n=100n = 100 and remain so all the way to n=106n = 10^6.

Path 5 is the clearest illustration. It ends at WT≈1W_T \approx 1, so the chain rule would suggest an answer near 12\tfrac12. But the left sum is 0.005 — essentially zero. The path climbed by one, but it also paid T=1T = 1 in quadratic variation, and the Itô identity subtracts half of that. Path 5 shows in one line why ∫W dW\int W \,\dW 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 x2x^2:

(W+ΔW)2−W2=2W⋅ΔW+(ΔW)2.(W + \Delta W)^2 - W^2 = 2W \cdot \Delta W + (\Delta W)^2.

Solve it for the term this page cares about:

W⋅ΔW=12[(W+ΔW)2−W2]−12(ΔW)2.W \cdot \Delta W = \tfrac12\left[(W + \Delta W)^2 - W^2\right] - \tfrac12 (\Delta W)^2.

Now add that over the grid. The bracket telescopes: every W(ti)2W(t_i)^2 appears once with a plus and once with a minus except the ends, leaving 12WT2\tfrac12 W_T^2. Nothing of the path's interior survives in that part — only the endpoint. The second piece is just −12∑(ΔW)2-\tfrac12\sum (\Delta W)^2. So on every grid,

∑W(ti)⋅ΔWi=12WT2−12∑(ΔW)2.\sum W(t_i) \cdot \Delta W_i = \tfrac12 W_T^2 - \tfrac12\sum (\Delta W)^2.

That is the left-endpoint identity.

For the right endpoint, write W(ti+1)=W(ti)+ΔWiW(t_{i+1}) = W(t_i) + \Delta W_i. Then

W(ti+1)⋅ΔWi=W(ti)⋅ΔWi+(ΔWi)2,W(t_{i+1}) \cdot \Delta W_i = W(t_i) \cdot \Delta W_i + (\Delta W_i)^2,

so summing gives

right=left+∑(ΔW)2=12WT2+12∑(ΔW)2.\text{right} = \text{left} + \sum (\Delta W)^2 = \tfrac12 W_T^2 + \tfrac12\sum (\Delta W)^2.

For the midpoint, split each step into two half-steps with increments δ1\delta_1 and δ2\delta_2, so ΔW=δ1+δ2\Delta W = \delta_1 + \delta_2 and W(mi)=W(ti)+δ1W(m_i) = W(t_i) + \delta_1. The same algebra leaves

mid=12WT2+12(∑δ12−∑δ22),\text{mid} = \tfrac12 W_T^2 + \tfrac12\left(\sum \delta_1^2 - \sum \delta_2^2\right),

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 n→∞n \to \infty. Section 2.3 has already established the one fact the page needs:

∑(ΔW)2→T,path by path.\sum (\Delta W)^2 \to T, \quad \text{path by path.}

Plug that into the three identities:

  • Left: 12WT2−12∑(ΔW)2→12WT2−12T\tfrac12 W_T^2 - \tfrac12\sum (\Delta W)^2 \to \tfrac12 W_T^2 - \tfrac12 T.
  • Midpoint: each half-step grid carries half the quadratic variation, so ∑δ12→12T\sum \delta_1^2 \to \tfrac12 T, ∑δ22→12T\sum \delta_2^2 \to \tfrac12 T, and their difference dies. Thus mid→12WT2\text{mid} \to \tfrac12 W_T^2.
  • Right: 12WT2+12∑(ΔW)2→12WT2+12T\tfrac12 W_T^2 + \tfrac12\sum (\Delta W)^2 \to \tfrac12 W_T^2 + \tfrac12 T.

Three limits, spaced by exactly 12T\tfrac12 T and TT. Those gaps are not discretisation error; they are the quadratic variation itself.

For a smooth curve x(t)x(t), the same identities hold with xx in place of WW, but now ∑(Δx)2→0\sum (\Delta x)^2 \to 0. All three sums collapse to the chain-rule value 12xT2\tfrac12 x_T^2 (xx starting at 0, as WW 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 W(ti)⋅ΔWiW(t_i) \cdot \Delta W_i. The increment ΔWi\Delta W_i is independent of everything up to tit_i and has mean zero. So

E[W(ti)⋅ΔWi]=E[W(ti)]⋅E[ΔWi]=0.\E[W(t_i) \cdot \Delta W_i] = \E[W(t_i)] \cdot \E[\Delta W_i] = 0.

Every term has mean zero; the whole sum has mean zero. That is why

E[left]=0.\E[\text{left}] = 0.

A right-endpoint term is

W(ti+1)⋅ΔWi=W(ti)⋅ΔWi+(ΔWi)2.W(t_{i+1}) \cdot \Delta W_i = W(t_i) \cdot \Delta W_i + (\Delta W_i)^2.

The first piece still has mean zero; the second has mean dt\dt. Summing nn of them gives

E[right]=n⋅dt=T.\E[\text{right}] = n \cdot \dt = T.

The midpoint sees half of that: E[mid]=12T\E[\text{mid}] = \tfrac12 T.

Means of the three sums

The second run: 20,000 fresh paths at n=104n = 10^4, same seed stream, from expectations.{left,mid,right}.{mean,se} of the same file.

summean over 20,000 paths± s.e.expected
left−0.00410.00490
mid0.49590.004912T=0.5\tfrac12 T = 0.5
right0.99600.0049T=1T = 1

The running-sum table shows the same story in continuous time. The left running total I(t)I(t) has mean 0 at every tt, not just at TT. Its mean-square is 12t2\tfrac12 t^2. And the second half of the sum has no memory of the first — the martingale property in action. The right running total R(t)R(t), by contrast, drifts upward at rate 1: E[R(t)]=t\E[R(t)] = t.

Running sums at four checkpoints

The same 20,000 paths, read at four checkpoints, from expectations.running[*].{I,I_sq,R}. The 12t2\tfrac12 t^2 column is the limit the mean-square is compared against, not a measurement.

ttE[I(t)]\E[I(t)]E[I(t)2]\E[I(t)^2]12t2\tfrac12 t^2E[R(t)]\E[R(t)]tt
0.250.0017 ± 0.00130.0326 ± 0.00080.03120.2517 ± 0.00130.25
0.500.0005 ± 0.00250.1251 ± 0.00310.12500.5005 ± 0.00250.50
0.75−0.0039 ± 0.00370.2726 ± 0.00650.28120.7460 ± 0.00370.75
1.00−0.0041 ± 0.00490.4839 ± 0.01180.50000.9960 ± 0.00491.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 [ti,ti+1][t_i, t_{i+1}] is the number of shares you chose at tit_i. You fix that position first; the price move ΔSi\Delta S_i arrives afterwards. The P&L for that step is therefore

h(ti)⋅ΔSi,h(t_i) \cdot \Delta S_i,

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 ΔSi\Delta S_i by h(ti+1)h(t_{i+1}) — a position chosen after seeing the move that generated the profit. The expectation run shows exactly what that earns:

E[right]=T\E[\text{right}] = T

(with h=S=Wh = S = W, 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 h(t)h(t) may depend only on what is known at time tt, the filtration Ft\mathcal{F}_t. 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

mid→12WT2\text{mid} \to \tfrac12 W_T^2

is the Stratonovich integral, written

∫0TW∘dW.\int_0^T W \circ \dW.

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 g(x)=x2g(x) = x^2,

d(x2)=2x dx\dd(x^2) = 2x \,\dd x

holds exactly in the Stratonovich sense.

The relation between the two is

∫0TW∘dW=∫0TW dW+12T,\int_0^T W \circ \dW = \int_0^T W \,\dW + \tfrac12 T,

half the quadratic variation of the integrand against the driver. That extra 12T\tfrac12 T 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:

E[mid]=12T,\E[\text{mid}] = \tfrac12 T,

a built-in drift. On this course, "∫⋅ dW\int \cdot \,\dW" 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 x(t)=t2x(t) = t^2 on the same five grids. Form the same three sums ∑x⋅Δx\sum x \cdot \Delta x. The identities above hold letter-for-letter with xx in place of WW; the only difference is the size of the increments. A step of length dt\dt has

Δx≈x′(t)⋅dt=2t⋅dt,\Delta x \approx x'(t) \cdot \dt = 2t \cdot \dt,

so (Δx)2(\Delta x)^2 is dt2\dt^2-sized. Summing nn of them gives

∑(Δx)2≈dt⋅∫01(2t)2 dt=(4/3)⋅dt,\sum (\Delta x)^2 \approx \dt \cdot \int_0^1 (2t)^2 \,\dt = (4/3) \cdot \dt,

and on the grid the JSON reports

n⋅∑(Δx)2=4/3n \cdot \sum (\Delta x)^2 = 4/3

to five figures at n=100n = 100 and six or better from n=1,000n = 1{,}000. Thus

∑(Δx)2≈4/(3n),\sum (\Delta x)^2 \approx 4/(3n),

and the gap between right and left is exactly that.

The three sums land on the chain-rule value 12xT2=12\tfrac12 x_T^2 = \tfrac12, with the gap shrinking like 1.33/n1.33/n:

Smooth control, x = t²

The smooth control, x(t)=t2x(t) = t^2 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}.

nnleftmidrightright − leftn⋅∑(Δx)2n \cdot \sum (\Delta x)^2
1000.493330.499980.506670.013331.3333
1,0000.499330.500000.500670.0013331.3333
10,0000.4999330.5000000.5000670.00013331.3333
100,0000.49999330.50000000.50000671.333×10−51.333 \times 10^{-5}1.3333
1,000,0000.499999330.500000000.500000671.333×10−61.333 \times 10^{-6}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 ±dt\pm\sqrt{\dt} coin walk of 2.1, every increment is exactly ±dt\pm\sqrt{\dt}. So

(ΔWi)2=dt(\Delta W_i)^2 = \dt

on every step, with no randomness at all. Summing nn of them gives

∑(ΔW)2=n⋅dt=T\sum (\Delta W)^2 = n \cdot \dt = T

exactly, at n=100n = 100 as much as at n=106n = 10^6.

Put that into the left-endpoint identity above:

∑W(ti)⋅ΔWi=12WT2−12∑(ΔW)2=12WT2−12T.\sum W(t_i) \cdot \Delta W_i = \tfrac12 W_T^2 - \tfrac12\sum (\Delta W)^2 = \tfrac12 W_T^2 - \tfrac12 T.

No limit, no approximation, no spread: the Itô correction −12T-\tfrac12 T is paid in full at every grid size.

One coin path in the JSON ends at WT=−1.0W_T = -1.0. Its left sum is

12(−1)2−12=0,\tfrac12(-1)^2 - \tfrac12 = 0,

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 −12T-\tfrac12 T term: it is not a Gaussian artefact, not a limiting artefact, but the algebraic price of dt\sqrt{\dt}-sized steps.

Into 2.5 — what Itô's lemma is going to do with this

Section 2.4 has shown that

∫0TW dW=12WT2−12T.\int_0^T W \,\dW = \tfrac12 W_T^2 - \tfrac12 T.

The chain rule would have given 12WT2\tfrac12 W_T^2. The extra −12T-\tfrac12 T is the quadratic-variation term.

Itô's lemma is going to generalise that. For a smooth function gg, the lemma says

dg(Wt)=12g′′(Wt) dt+g′(Wt) dWt.\dd g(W_t) = \tfrac12 g''(W_t) \,\dt + g'(W_t) \,\dW_t.

The 12g′′ dt\tfrac12 g''\,\dt term is exactly the "−12T-\tfrac12 T" phenomenon in disguise: it is the quadratic variation of WW being fed through the second derivative of gg.

For g(x)=x2g(x) = x^2,

g′(x)=2x,g′′(x)=2,g'(x) = 2x, \qquad g''(x) = 2,

so Itô's lemma gives

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

Integrate to TT:

WT2=2∫0TW dW+T,W_T^2 = 2\int_0^T W \,\dW + T,

and rearrange:

∫0TW dW=12WT2−12T,\int_0^T W \,\dW = \tfrac12 W_T^2 - \tfrac12 T,

the identity you just measured on every grid.

The check you would want in 2.5 is this one, twice: for g(x)=x2g(x) = x^2, where the two sides agree to machine precision on every grid as they did here, and for a gg that is not quadratic — exe^x or x3x^3 — where they agree only as n→∞n \to \infty, the third-order term ∑∣ΔW∣3→0\sum \lvert \Delta W \rvert^3 \to 0 from 2.3 doing the work. Draw many Brownian paths, compute

g(WT)−g(W0)g(W_T) - g(W_0)

on the left, and

12∫0Tg′′(W) dt+∫0Tg′(W) dW\tfrac12\int_0^T g''(W) \,\dt + \int_0^T g'(W) \,\dW

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 12g′′ dt\tfrac12 g''\,\dt 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: