Skip to content

Brownian Motion for Stock Modelling With a Discrete Walk Example

Original question

Can you explain Brownian motion intuitively and mathematically, and show how it is used to model stock prices?
Standard Brownian motion WtW_t starts at zero, has continuous paths, and has independent increments with Wt−Ws∼N(0,t−s)W_t-W_s\sim N(0,t-s) for t>st>s. In the geometric Brownian motion stock model, the Brownian increment drives random changes in the log price. Its standard deviation over a time interval Δt\Delta t is Δt\sqrt{\Delta t}.
Imagine taking ever smaller, independent random steps. If the variance of each step equals the time it takes, a year of accumulated steps still has variance one. A shorter interval contains less uncertainty, with a four-times shorter interval carrying half the standard deviation. This scaling helps explain why paths can be continuous and still wiggle sharply at small time scales.

In geometric Brownian motion, the stock changes proportionally to its current level. A 1%1\% move at 200200 is twice the dollar move at 100100. Putting the Brownian term inside an exponential gives a positive price at any finite time, assuming a positive initial price.

From Brownian shocks to a positive stock price

Under a constant-drift, constant-volatility model,
dSt=μSt dt+σSt dWt,S0>0.dS_t=\mu S_t\,dt+\sigma S_t\,dW_t,\qquad S_0>0.
Applying Itô's formula to log⁡St\log S_t subtracts half the instantaneous variance from the drift of the log price.
dlog⁡St=(μ−12σ2)dt+σ dWt.d\log S_t=\left(\mu-\tfrac12\sigma^2\right)dt+\sigma\,dW_t.

Integrating and exponentiating gives

St=S0exp⁡ ⁣[(μ−12σ2)t+σWt].S_t=S_0\exp\!\left[\left(\mu-\tfrac12\sigma^2\right)t+\sigma W_t\right].
The log return over time tt is normal with mean (μ−σ2/2)t(\mu-\sigma^2/2)t and variance σ2t\sigma^2t. The expected price is S0eμtS_0e^{\mu t}, using E[eσWt]=eσ2t/2\mathbb E[e^{\sigma W_t}]=e^{\sigma^2t/2}. For risk-neutral option pricing in this constant-rate model, use drift r−qr-q, where rr is the risk-free rate and qq a continuous dividend yield. An empirical price simulation under the real-world measure uses an estimate or scenario for μ\mu instead.
The distinction between μ\mu and μ−σ2/2\mu-\sigma^2/2 matters. In the model, μ\mu is the drift of the price relative to its current level. The logarithm curves down, so Itô's second derivative term reduces the drift of the log price. When you exponentiate a normal log return, its variance raises the mean price by the factor eσ2t/2e^{\sigma^2t/2}. That factor cancels the drift correction in the expectation. It does not affect the median, because exponentiation preserves the order of outcomes.

Take S0=100S_0=100, μ=0.06\mu=0.06, and σ=0.20\sigma=0.20, with time measured in years. After one year the log return has mean 0.040.04 and standard deviation 0.200.20. The expected price is about 106.18106.18, while the median price is about 104.08104.08. The difference comes from the right-skewed distribution created by exponentiation.

From a discrete walk to a Brownian-scale path

import numpy as np rng = np.random.default_rng(17) steps, paths = 252, 5_000 dt = 1 / steps mu, sigma, initial = 0.06, 0.20, 100 increments = rng.normal(0, np.sqrt(dt), (paths, steps)) log_returns = (mu - 0.5 * sigma**2) * dt + sigma * increments prices = initial * np.exp(np.cumsum(log_returns, axis=1)) print(prices[:, -1].mean(), initial * np.exp(mu))
The Gaussian sampling gives the exact distribution at the grid dates for constant parameters. The finite sample still has Monte Carlo error.

The scaling in the discrete walk is deliberate. Divide a year into nn intervals of length h=1/nh=1/n and give each fair step magnitude h\sqrt h. One step has mean zero and variance hh. The sum over kk steps has variance khkh, the elapsed time. Giving each step magnitude hh instead would make the annual variance nh2=hnh^2=h, which vanishes on refinement. Holding the step magnitude fixed would make the variance diverge. That calculation explains the units of the Brownian term in the price model and why a day's volatility is not the annual volatility divided by 252.

Interactive example

Explore a Brownian path at different resolutions

A seeded path is sampled at nested time grids. Compare the sum of squared increments with the theoretical quadratic variation of 1 at time 1.

64 increments · realised quadratic variation 0.7726 · theoretical 1.0000
A fixed Brownian path sampled on the selected time grid-2-1000.250.50.751TimeBrownian value
  • Sampled path

References and next steps