DI

Monte Carlo Lab

Simulate price paths, price an option by averaging payoffs, and see the estimate converge to Black-Scholes — the law of large numbers, live.

Before pricing an option, price the simplest random thing there is: the average roll of a fair die. Everyone knows the answer is 3.5 — so it is the perfect place to watch how Monte Carlo finds an average it does not know in advance.

Roll the die

Each roll is one Monte Carlo draw. Press Re-roll to redraw — with few rolls the average is all over the place; with many it settles on 3.5.

Estimated mean

3.468

True mean

3.500

95% CI

[3.363, 3.573]

Std. error

0.0534

Error vs 3.5

-0.032

3.5 inside CI?

yes ✓

How often each face came up

With enough rolls every face lands near the fair 16.7% — the flat distribution behind the mean of 3.5.

Loading Plotly…
The running average finds 3.5

Exactly the picture you will see for the option price on the next tab — wild at small N, then hugging the gold true-value line, with a 95% confidence band that shrinks like 1/√N.

Loading Plotly…
The same machine, two problems

What the drift and the noise of a price path correspond to on the die.

🎲 Dice roll📈 Option (GBM spot)
One drawOne roll, a number 1–6.One simulated path and its discounted payoff.
Drift (the signal)The true mean 3.5 — where every roll would land if there were no luck involved.The deterministic step (r − q − ½σ²)·Δt — where the price would drift with no random shock.
Noise (the luck)The ± swing of each roll around 3.5. A wider die (more faces, more spread) = more noise.The random shock σ·√Δt·Z each step. More volatility σ = more noise, wider fan of paths.
Average N drawsConverges to 3.5.Converges to the Black-Scholes price.
ErrorShrinks like 1/√N.Shrinks like 1/√N.

Same engine, same convergence — the die just has a drift and a noise you already trust. Switch to Option (GBM) and watch the identical curve find the option price instead of 3.5.

Monte Carlo pricing replaces a formula with an experiment: simulate many possible futures for the underlying, compute the option payoff on each, and average them. This free lab does exactly that under risk-neutral geometric Brownian motion, dS = (r−q)·S·dt + σ·S·dW, and shows the machinery every step of the way — the paths, the payoffs, and the price.

Why it converges — and why slowly

The Monte Carlo price is the discounted average payoff, and by the law of large numbers it converges to the true price as the number of simulations N grows. But the error shrinks only like 1/√N: to halve it you need four times the paths. The convergence chart makes this concrete — the estimate swings wildly at small N, then settles onto the exact Black-Scholes line, with a 95% confidence interval that narrows at that same square-root rate. It is the honest picture of why Monte Carlo is both universal and expensive.

What to try

Set N small and press Re-run a few times — the price jumps around. Crank N up and it locks onto Black-Scholes. Raise the volatility σ and watch the fan of paths widen and the confidence interval blow out. For the closed-form baseline this is converging to, open the Vanilla pricer; for the intuition behind risk-neutral pricing, start with risk-neutral pricing in three sentences. The interview angle — variance reduction, quasi-random sequences, when to prefer Monte Carlo over a PDE — is in the Coach.