📈 Stock Price Simulation — GBM

Geometric Brownian Motion · dS = μS·dt + σS·dW · Lognormal distribution · Black-Scholes foundation

GBM Parameters

Statistics

Mean final price
Median final price
% above S₀=100
Max final price
Min final price
E[S] = S₀·e^(μT)

Legend

Path ending above S₀
Path ending below S₀
Running (in progress)
Theoretical E[S]
Histogram shows final price distribution (lognormal).

Formula

dS = μS·dt + σS·dW
S(t) = S₀·exp((μ−σ²/2)t + σ·√t·Z)
E[S(t)] = S₀·e^(μt)
Z ~ N(0,1) per step

📈 Stock Price — Geometric Brownian Motion

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.

🔬 What It Demonstrates

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.

🎮 How to Use

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.

💡 Did You Know?

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.