Geometric Brownian Motion · dS = μS·dt + σS·dW · Lognormal distribution · Black-Scholes foundation
Simulate multiple stock price trajectories using the stochastic differential equation dS = μS·dt + σS·dW — the model at the heart of quantitative finance and the Black-Scholes options pricing formula.
GBM is the model underlying the Black-Scholes options pricing formula. Each path follows dS = μS·dt + σS·dW where dW is Brownian noise. The logarithm of S is normally distributed — leading to the lognormal distribution of stock prices (Samuelson 1965). μ is the expected annual return; σ is annual volatility. The bold dashed line shows the analytical mean E[S] = S₀·e^(μt), which lies above the median because the lognormal distribution is right-skewed.
Drag μ to positive values for a bull market (most paths end above S₀) or negative for a bear market. Increase σ to see trajectories fan out — more uncertainty, wider lognormal spread. Click "Run New" for a fresh ensemble. The dashed white line shows the analytical mean E[S] = S₀·e^(μt). The histogram below shows the distribution of final prices — green bars are outcomes above S₀, red bars below.
The Black-Scholes formula (Fischer Black, Myron Scholes, Robert Merton — 1973) won the 1997 Nobel Prize in Economics. It assumes GBM with constant μ and σ — in practice σ is not constant (the "volatility smile"), which is why options traders use more sophisticated models such as stochastic volatility (Heston model) or jump-diffusion (Merton jump model). Even so, GBM remains the foundational building block of quantitative finance.
This simulation models how a share price might evolve over time using Geometric Brownian Motion, the stochastic process at the foundation of the Black-Scholes formula. Each trajectory obeys the equation dS = μS·dt + σS·dW and is generated step by step over 252 trading days per year, so price changes scale with the current price and never go negative. Starting from S₀ = 100, the tool draws an ensemble of paths and tabulates the resulting lognormal distribution of final prices.
It plots N independent price paths produced by the exact GBM solution S(t) = S₀·exp((μ − σ²/2)t + σ·√t·Z), where Z is standard Gaussian noise drawn each daily step via the Box-Muller method. The bold white dashed line is the analytical mean E[S] = S₀·e^(μt); because the distribution is right-skewed it sits above the median. A histogram below bins the final prices to reveal their lognormal shape.
Four sliders set the model: drift μ (−0.2 to 0.5 per year), volatility σ (0.05 to 0.8), number of trajectories N (5 to 50) and time horizon T (0.25 to 5 years). Positive μ gives a bull scenario, negative a bear one; raising σ fans the paths wider. Press "Run New Simulation" to draw a fresh random ensemble. The statistics panel reports mean, median, min, max and the percentage of paths finishing above S₀.
Because returns compound multiplicatively, the median path drifts below the mean even when μ is positive: more than half of GBM trajectories can finish below the average. This is the volatility drag captured by the −σ²/2 term, and it is why a volatile asset with a positive expected return can still leave the typical investor disappointed.
Geometric Brownian Motion (GBM) is a continuous-time stochastic process where the proportional change in a value is driven by a constant drift plus random Brownian noise, written as dS = μS·dt + σS·dW. Because the change scales with the current price, the price stays positive and its logarithm follows a normal distribution. It is the standard model for share prices and the basis of the Black-Scholes options formula.
It splits the time horizon T into 252 steps per year and applies the exact discrete solution S(t) = S₀·exp((μ − σ²/2)·dt + σ·√dt·Z) at every step, where Z is a standard normal random number generated by the Box-Muller transform. Each path starts at S₀ = 100, and N such independent paths are precomputed before being animated across the chart.
Drift μ is the expected annual return and tilts the overall trend: positive values push most paths upward (a bull market), negative values pull them down. Volatility σ is the annual standard deviation of returns and sets how widely the paths fan out, so a larger σ produces a broader, more uncertain spread of final prices.
It is a useful approximation rather than an exact description. GBM assumes constant μ and σ and continuous paths, but real markets show changing volatility (the volatility smile), sudden jumps and fatter tails than the lognormal allows. Practitioners extend it with stochastic-volatility models such as Heston or jump-diffusion models to capture these effects.
The lognormal distribution of GBM prices is right-skewed, so its mean E[S] = S₀·e^(μt) is pulled up by a few large outcomes and exceeds the median. The −σ²/2 term in the exponent, known as volatility drag, lowers the typical path even when the expected value rises, which is why the dashed mean line can lie above the bulk of the trajectories.