A random walk is a running total of independent steps. Take a step of fixed size every day — up or down, equally likely, and today's step tells you nothing about tomorrow's — and keep a running sum. SnS_n is that sum after nn steps: where you ended up, not how far you walked.

Random walks are used extensively in pricing models. We cannot be certain how the price of an underlying asset will behave over time, so we model it as moving randomly — and the simplest version of that, the one this page measures, rises and falls with equal probability.

Random ups and downs mostly cancel, so in any random walk you end up near zero. That's instinctive — and wrong.

The spread grows — the mean doesn't

At any step the expected return will be 0 — and indeed the expected return over any time will be zero. But you're looking at the P&L spread, and that's a function of how far the P&L moves over time: over 4 days it could move up by 4 or down by 4 but those are just two outcomes in 16 and as the number of steps increases these two outcomes of maximum distance become increasingly unlikely. The spread represents the typical distance the path ends up at and that is n\sqrt{n}, standard deviation; the expected value would still be 0. Each day the variance moves by 1; hence 4 days' movement is 4 and the square root of that is 2 — the typical spread after 4 days.

Why variance is the thing that adds

For an independent random variable which can go up or down with equal probability (+1, −1), the expected value is 0, but the variance is 1 (0.5⋅(−1)2+0.5⋅120.5 \cdot (-1)^2 + 0.5 \cdot 1^2). If you add two such independent variables, say AA and BB, and square to get the variance, you end up with:

  • E[(A+B)2]=E[A2]+E[B2]+E[2AB]\E[(A+B)^2] = \E[A^2] + \E[B^2] + \E[2AB]
  • and since independence allows us to split E[AB]=E[A]⋅E[B]\E[AB] = \E[A] \cdot \E[B]
  • we get E[(A+B)2]=E[A2]+E[B2]+2(E[A]⋅E[B])\E[(A+B)^2] = \E[A^2] + \E[B^2] + 2(\E[A] \cdot \E[B])
  • and because both E[A]\E[A] and E[B]=0\E[B] = 0
  • we end up with E[(A+B)2]=E[A2]+E[B2]\E[(A+B)^2] = \E[A^2] + \E[B^2]
  • or, alternatively Var⁡(A+B)=Var⁡(A)+Var⁡(B)\Var(A+B) = \Var(A) + \Var(B)

If you have P&L spread for one day, all other things being equal, you shouldn't expect the spread for 4 days to quadruple — it's the variance that quadruples. The spread is the standard deviation, the square root of variance, hence 2x not 4x.

· ·
Coin walk spread against n

Coin walk, 10 000 paths, seed 20260830 — from the committed experiments/2_1_random_walks.json.

nnVar⁡(Sn)\Var(S_n)Var⁡(Sn)/n\Var(S_n)/nE∣Sn∣\E\lvert S_n\rvertE∣Sn∣/n\E\lvert S_n\rvert/\sqrt{n}E∣Sn∣/n\E\lvert S_n\rvert/n
100103.351.0338.070.80750.0807
1 0001 028.861.02925.610.80980.0256
10 00010 215.931.02280.840.80840.0081
100 000101 122.331.011254.230.80390.0025

How far you actually get

After 10,000 steps, approximately 80 steps away from 0:

  • Plain average of the distances (E∣Sn∣≈0.8⋅n\E\lvert S_n\rvert \approx 0.8 \cdot \sqrt{n})
  • So 80≈0.8×10,00080 \approx 0.8 \times \sqrt{10{,}000}.

So that's 80 steps for 10,000 steps walked — 8 in every 1000 steps but that ratio keeps falling as the walk lengthens: the mean absolute distance does not grow linearly with steps. It grows linearly with the square root of steps.

D1Random walk → Brownian motion
 

Zoom keeps the first 1/z of the path and stretches space by √z — the scaling Brownian motion is invariant under. The zoomed picture is as rough as the whole one; that roughness is what stops the path having a derivative.

Why the continuous limit needs dt\sqrt{\dt}

If you break a stock movement, say over time TT, into nn steps of time dt\dt, then the only step size which gives you a variance which neither explodes nor collapses to zero over time is the square root of dt\dt.

Steps of size less than dt\sqrt{\dt} cause the variance to collapse to 0; Steps of size greater than dt\sqrt{\dt} cause the variance to explode. Only with steps of size dt\sqrt{\dt} does the variance remain useful — finite, non-zero and linear in TT.

Variance against dt, by step size

Variance at the end of the walk, over 10 000 coin walks across [0,1][0, 1] in n=1/dtn = 1/\dt steps of the size at the head of each column — from the committed experiments/2_1_random_walks.json. Read down a column as dt\dt shrinks.

dt\dtstep dt\dtstep dt3/4\dt^{3/4}step dt\sqrt{\dt}step dt1/4\dt^{1/4}
10−110^{-1}0.1000.3231.0013.13
10−210^{-2}0.009860.09981.00610.07
10−310^{-3}0.001010.03171.01931.74
10−410^{-4}0.0001010.009991.01799.80

This random walk with time step dt\dt has a per-step variance of dt\dt. As dt→0\dt \to 0 this walk becomes a single well-defined random process, and that random process is what page 2.2 covers.

Check

A fair ±1 walk runs 10,000 steps. Typically, how far from zero does it end?

A random walk’s typical distance from start after time t is d. After time 4t it is typically:

Building a continuous-time model on a grid of step dt over a fixed horizon, the random increment must be sized like:

Two independent sources of daily P&L noise have standard deviations £30k and £40k. The combined daily sd is:

A fair ±1 step X has E[X] = 0. What is E[X²]?