Learning Objectives
By the end of this section, you will be able to:
- Explain why classical calculus breaks down when prices wiggle infinitely often, and why a new kind of calculus is needed.
- Construct Brownian motion as the limit of a rescaled random walk with steps of size .
- State the four defining properties of standard Brownian motion and recognise why each one is mathematically essential.
- Derive the identity from quadratic variation — the single fact that powers Itô calculus.
- Simulate Brownian motion and Geometric Brownian Motion in NumPy and PyTorch, and recognise these simulations inside every Monte-Carlo option-pricing engine.
The Question Calculus Cannot Answer
In Section 31.1 we wrote down the Black-Scholes PDE as if its and terms were just ordinary derivatives. They are not. A stock price is not a smooth curve — it is a microscopically jagged path that wiggles in every interval, no matter how small. Plot a minute-by-minute price and zoom in; you do not see a straight line, you see another wiggly graph. Zoom in again — still wiggly. The path is nowhere differentiable, and a function with no derivative breaks every chain rule you have ever used.
The big question: How do we do calculus on objects that have no slope? That is the problem stochastic calculus was invented to solve, and Brownian motion is its primary building block — the rough surface every other process is built on top of.
The trick will turn out to be: replace the smooth differential with a random differential , redefine what a derivative means, and pay a single price — the Itô correction that appears in Black-Scholes. Everything in this chapter hinges on building carefully, so let us do that now.
From a Drunkard's Walk to a Stock Price
Forget options for a moment and imagine a drunk standing at the origin of a number line. Every second he flips a fair coin: heads he steps , tails he steps . After seconds his position is
Two textbook facts: (drift-free), and (variances add because the steps are independent). So the typical magnitude of his position after seconds is , not . This is the famous square-root law of diffusion.
The Magic of the √dt Scaling
Now let us speed the drunk up. Say we want him to take steps in one second instead of seconds. If we kept the step size at , after one second his typical distance would be , which blows up as . Useless — we get infinite wandering.
If instead we made each step , after one second his typical distance would be . Equally useless — every path collapses to zero.
There is exactly one Goldilocks choice: step size , i.e. with . Then — finite and independent of . As these rescaled walks converge in distribution to a non-trivial limit: standard Brownian motion .
The visualizer below lets you watch this convergence happen. Drag the slider for N: each panel keeps the same underlying random sequence but uses 4× more steps. Notice that the overall shape is preserved while finer wiggles appear — that is Donsker's invariance principle in action.
Brownian Motion: The Formal Definition
The limit object we just sketched is a continuous-time stochastic process characterised by four properties (sometimes called the Wiener-process axioms):
- Starts at zero. .
- Independent increments. For any , the random variables and are independent. The past tells you nothing about the future jump.
- Gaussian increments. . Mean zero, variance equal to the elapsed time.
- Continuous paths. The map is (almost surely) continuous. No jumps.
From these four axioms alone, the entire algebra of stochastic integrals follows. Everything you will see in the next sections — Itô's lemma, the Black-Scholes PDE, risk-neutral pricing — is a consequence.
Playing With the Process
Time to get your hands on it. The explorer below simulates either pure Brownian motion or its multiplicative cousin Geometric Brownian Motion . Each coloured curve is one independent realisation drawn from the distribution described above.
- Switch between W(t) and S(t) with the buttons.
- Slide σ up — paths spread out faster. The dashed band traces , the 95% envelope.
- Slide steps from 50 to 2000 — finer time grids reveal finer wiggles, but the path's overall shape and ending point stay roughly the same. That is the invariance principle again.
- For S(t) mode, drag μ: the dashed curve is the expected price . Individual paths fluctuate around it.
- Click New seed to get a fresh set of paths.
Strange Properties of Brownian Paths
Brownian motion is the source of many counter-intuitive facts. The following four are the ones every quant must internalise:
| Property | What it means | Why it matters |
|---|---|---|
| Continuous everywhere | Paths have no jumps; you can draw them without lifting the pen. | Stock log-prices in Black-Scholes never gap. |
| Differentiable nowhere | Pick any time t. The slope (W(t+h) - W(t))/h does not converge as h → 0. | Cannot apply classical chain rule — need Itô calculus. |
| Self-similar | For any c > 0, the process c·W(t/c²) is again a Brownian motion. | Volatility scales with √t, not t — pricing formulas inherit this. |
| Infinite total variation | Summed |ΔW| over a time interval is infinite — the path has infinite arclength. | Riemann-Stieltjes integrals against dW don't exist; we need stochastic integrals. |
Quadratic Variation: Why
Take the interval and divide it into sub-intervals of length . Form the sum
Each increment is normal with variance . So , and therefore
The variance of can be computed from the fourth moment of a normal: as . So converges (in mean-square) to the deterministic constant . In differential shorthand:
From W(t) to Stock Prices: Geometric Brownian Motion
Pure Brownian motion is not a great model for stock prices: it can go negative, and it has constant variance per unit time rather than constant percentage variance. The fix is to exponentiate it. Define
This is Geometric Brownian Motion (GBM). It is the process Black and Scholes assumed for the underlying stock — every modern derivatives engine starts here. Three things are worth unpacking:
- It is always positive. for every , no matter how negative wanders. Stock prices stay above zero — good.
- Log-returns are Gaussian. . Empirically log-returns of liquid stocks really are roughly normal at short horizons — a major reason the model survives.
- Expected price grows exponentially. . The correction is exactly what is needed to cancel the convexity of the exponential — this is the first Itô-style correction we will see, and it appears again as the missing term in Black-Scholes.
Switch the explorer above into S(t) mode and play with and . The dashed curve is ; the coloured paths fluctuate around it.
Worked Example: Hand-Computing a Path
Before you let Python loose, do five steps with a pencil. The example is small enough to redo on a napkin, and it nails down the meaning of every symbol in the simulator.
▶ Worked example: a 5-step discrete Brownian path with , ,
We simulate a Brownian motion as the limit of a scaled random walk with coin flips and step-size . With seed 42, NumPy produces the sequence
The discrete path is the running sum scaled by :
| k | t_k | ξ_k | running sum Σξ | W(t_k) = √Δt · Σξ |
|---|---|---|---|---|
| 0 | 0.0 | — | 0 | 0.0000 |
| 1 | 0.2 | −1 | −1 | −0.4472 |
| 2 | 0.4 | +1 | 0 | 0.0000 |
| 3 | 0.6 | −1 | −1 | −0.4472 |
| 4 | 0.8 | −1 | −2 | −0.8944 |
| 5 | 1.0 | −1 | −3 | −1.3416 |
Step 1: increments. Each Δ-move is . Numerically: .
Step 2: path values are the running totals of those increments (read off the last column above).
Step 3: quadratic variation. Each exactly, so
The identity reduces to a one-line check at this discretisation level — there is no chance involved at all, because for a ±1 walk every squared step is identically. With Gaussian increments it would be approximately , but the law of large numbers kicks in quickly.
Step 4: turn it into a stock price. Take , , . At :
So this particular realisation of the market loses about 21% over the year — a bad path. Most paths do better; only ~12% finish below 80. The visualizer in S(t) mode shows you the full shape of the distribution.
Step 5: sanity check via simulator. Set the explorer to steps = 5, , paths = 1, and New seed until you see a downward path that ends near 78–80. That is one realisation of exactly this hand calculation.
Plain Python Simulation
We now translate the recipe into NumPy. The exact numbers below come from running this script — they are not approximations, they are the precise output of . Click any line on the right and the corresponding explanation card will appear on the left.
PyTorch: Batched Path Simulation
Pricing a single derivative typically needs hundreds of thousands of simulated paths. Looping in Python would be glacial; PyTorch lets us draw the entire grid of increments in one CUDA kernel. Here is a tiny example with paths and time steps — small enough that you can read every entry. Again, all numbers shown in the explanation cards are the literal output of running this script.
Why Quants Care
Brownian motion is not just a mathematical curiosity — it is the atomic noise model of quantitative finance, physics, and biology. A partial list:
| Domain | Use | Famous result |
|---|---|---|
| Derivative pricing | Underlying stock log-prices follow σ W(t). | Black–Scholes formula (1973) |
| Interest-rate modelling | Short rate r(t) driven by dr = a(b - r) dt + σ dW. | Vasicek (1977), CIR (1985), Hull–White |
| Portfolio optimisation | Wealth dynamics dW_t = (r W_t + π(μ−r)) dt + π σ dW. | Merton's optimal consumption (1969) |
| Statistical physics | Pollen grain in fluid — Einstein's original 1905 model. | Diffusion equation ∂u/∂t = ½ ∂²u/∂x² |
| Machine learning | Score-based generative models reverse a Brownian forward process. | Stable diffusion's forward SDE |
| Algorithms | Stochastic gradient descent ≈ noisy gradient flow + Brownian. | SGD-as-SDE analysis (Mandt et al. 2017) |
The Big Idea. Every random thing that evolves in continuous time and is driven by independent, mean-zero noise looks locally like a Brownian motion. That is why we spend a whole section on it. Master and you have the building block for derivative pricing, interest-rate models, diffusion in physics, score-based generative AI, and a great deal of modern probability.
Summary
- A stock's price wiggles infinitely often — its path is nowhere differentiable. Classical calculus cannot handle this; stochastic calculus can.
- The rescaled random walk with step size converges to Brownian motion (Donsker's theorem). The scaling is what keeps variance finite as the time step shrinks.
- is defined by four axioms: , independent increments, Gaussian increments , and continuous paths.
- The single most important consequence is the quadratic-variation identity . It is the seed of every difference between Itô and Newton-Leibniz calculus.
- Geometric Brownian Motion is the standard stock-price model in Black-Scholes. Its expected price grows exponentially at rate .
- A few lines of NumPy or PyTorch are enough to simulate millions of paths — the foundation of every Monte-Carlo derivatives engine in Section 31.8.
Next we promote into a working tool — Itô's lemma — and use it to write down the SDE for any function of . That is the last missing ingredient before the Black-Scholes PDE falls out almost for free.