An interactive explainer

Can we price equity derivatives by a coin toss?

A hands-on tour from flipping coins to pricing stock options with thousands of simulated futures. No maths background needed: every idea comes with a picture you can play with.

One way to price an option is to simulate many possible futures and average its discounted payoff. This method is called Monte Carlo simulation. We will build up the idea from coin tosses, then generate bell-curve increments directly.

Start with a coin
  1. 01From coin tosses to the bell curveSums of tosses become normal
  2. 02Random walk and Brownian motionA coin-toss walk becomes Brownian motion
  3. 03Forward price and GBMSimulating a stock price path
  4. 04Flat volatility vs. the smileBlack-Scholes vs. local volatility
  5. 05ShowdownPricing options by Monte Carlo

Chapter 1

From coin tosses to the bell curve

Toss a fair coin. It lands heads or tails, each with probability one half. We write tails as 0 and heads as 1. A die is similar, with six equally likely faces.

A chart that lists every outcome with its probability is called a probability distribution.

One coin: tails = 0 and heads = 1, each with probability ½.
One die: the faces 1 to 6, each with probability ⅙.

The mean (expected value) is the average we would approach over many repeated tosses. Variance measures the average squared distance from that mean. The standard deviation is the square root of the variance: it describes the spread in the same units as the outcomes.

Mean, variance and standard deviation of one toss
One tossMean μVariance σ²Standard deviation σ
Fair coin (0/1)½¼½
Fair die (1–6)3.535/12
≈ 2.917
√(35/12)
≈ 1.708

The mean of 3.5 is a long-run average, even though a single die can never show 3.5.

Now toss n coins and add up the results. The sum is simply the number of heads. Its distribution is called the binomial distribution. We can also add n die rolls: the same rules for the mean, variance and standard deviation apply to independent tosses of either kind.

Formula

Sn = X1 + … + Xn

mean = n·μ, variance = n·σ²

standard deviation = σ·√n

In words Adding n independent tosses multiplies the mean and variance by n, so the standard deviation grows with the square root of n.

For n fair coins, the mean is n/2, the variance is n/4 and the standard deviation is √n/2. For n fair dice, the mean is 3.5n, the variance is 35n/12 and the standard deviation is √(35n/12).

When we add many independent trials of the same kind, with finite, non-zero variance, the standardised sum gets closer to a bell curve. This is the Central Limit Theorem. Coins and dice satisfy these conditions. Standardising means subtracting the sum’s mean and dividing by the sum’s standard deviation.

Formula

Z = Sn − n·μσ·√n, φ(z) = e−z²/2√(2π)

In words Z tells us how many standard deviations the sum lies above or below its mean. Here, μ and σ are the mean and standard deviation of one toss, so the sum’s standard deviation is σ√n. The function φ describes the standard normal bell curve.

Watch the bell curve appear

Try increasing tosses per experiment: does the shape get closer to the bell curve? More experiments make the histogram less noisy.

Bars: simulated experiments. Dots or curve: theory. Tap or hover on the chart to read values.

The distance is the largest gap between the share of simulated sums at or below any value and the share theory predicts (the Kolmogorov distance). Zero means a perfect match.

Key takeaway For independent tosses of the same fair coin or die, the standardised sum gets closer to a bell curve as the number of tosses grows.

Chapter 2

Random walk and Brownian motion

Take the same 0/1 coin and turn every toss into a step: heads moves you one step up, tails one step down. Toss after toss you trace a zig-zag line called a random walk.

Formula

step = 2·toss − 1  (so 1 → +1 and 0 → −1), Δx = √Δt

In words Each toss moves the walker up or down, and if we take smaller time steps we must also take smaller steps, shrinking them with the square root of the time step.

Why the square root? With n steps in one unit of time, the position is a sum of n tosses, whose spread grows like √n. Shrinking each step to √Δt = 1/√n keeps the overall spread fixed. As the steps get finer, the walk becomes the jittery curve physicists call Brownian motion Wt (mathematicians also call it the Wiener process).

Formula

Var(Wt) = t, WT ~ N(0, T)

In words WT ~ N(0, T) reads "the position at time T follows a bell curve centred at 0 with variance T", so its spread is √T: the longer you walk, the further you may wander.

From coin tosses to Brownian motion

Try more steps at the same total time. The steps get smaller, but the overall spread stays similar. The envelopes describe one time at a time, not the whole path.

Simulated walks. Dashed: ±1 and ±2 times √t. Switch Chart view to Distribution to see where the walkers are now; wider screens also have a side panel, with the bell curve N(0, t).

Key takeaway: a coin-toss walk approaches Brownian motion as its time steps shrink. With a finite number of tosses its terminal position is discrete, and approximately N(0, T) when there are enough steps.

Chapter 3

Forward price and Geometric Brownian Motion

The forward price

What price should we agree on today for a stock that is delivered, and paid for, in T years? You could buy it now with borrowed money at the interest rate r and keep it, collecting dividends at the yield q. Any other price would let someone make money without risk. That fair delivery price is the forward.

Formula

F(T) = S0 · e(r − q)·T

In words The forward is today's price grown by the interest you pay minus the dividends you receive.

Your forward curve, with the dot at your maturity T. Grey: the spot price today (the flat case, r = q) and two example curves.
  • r > q: contango. Interest outweighs dividends, so the forward rises with maturity.
  • r = q: flat. Interest and dividends cancel, so the forward equals today's price.
  • r < q: backwardation. Dividends outweigh interest, so the forward falls with maturity.

Geometric Brownian Motion

A stock price does not add steps, it multiplies them: a 1% move is worth more on a high price than on a low one. So we let the logarithm of the price follow a Brownian motion. The result is Geometric Brownian Motion (GBM). For pricing we use the risk-neutral drift r − q, so on average the stock grows exactly like the forward. The size of the random moves is the volatility σ.

Formula

dS = (r − q)·S·dt + σ·S·dW

Si+1 = Si · exp( (r − q − σ²/2)·Δt + σ·√Δt·Zi ), Zi ~ N(0, 1)

In words Many small coin-toss steps lead to Brownian motion. Here we generate its bell-curve increments directly, then multiply the stock price by a drift and a random factor at each step.

Why −σ²/2? In the exponent, an up-step and a down-step of the same size are equally likely, but they do not cancel once you take the exponential: e+0.1 ≈ 1.105 is a gain of 10.5%, while e−0.1 ≈ 0.905 is a loss of only 9.5%. Left alone, the average price would drift slightly above the forward. Subtracting σ²/2, a small "convexity correction", removes exactly that extra, so the average stays equal to the forward.

Simulate 5,000 stock price paths

20 highlighted paths and the average of all 5,000 (thick). Dashed: the forward F(t). Switch Chart view to Distribution for a full-width histogram and lognormal density; wider screens also have a side panel. Grey: 500 of the other paths.

Key takeaway A stock path uses multiplicative random moves. With the risk-neutral drift, its expected price equals the forward. More simulated paths typically give a more precise estimate of that expectation.

How uncertainty adds up: total variance

In this lab, volatility depends only on time. Total variance w(T) is then the variance of ln ST. Think of it as an odometer for uncertainty: its rate of growth is σ², the variance rate. With a smile, total implied variance is instead a way to quote option prices at each strike; it is not generally the variance of the log price.

Formula

w(T) = σ1²·Δt + σ2²·Δt + … (= σ²·T for a flat σ)

σimp(T) = √(w(T) / T), σfwd(T1, T2) = √[(w(T2) − w(T1)) / (T2 − T1)]

In words Each stretch adds a non-negative block of variance. The equivalent implied volatility is the square root of the average variance rate, not the ordinary average of the quarter volatilities.

The volatility between two future dates is the forward volatility. Here "forward" means between two future dates, not the forward price from above. Why can the total variance never go down?

A variance budget for one year

Try Calm after a storm. What falls, and what keeps growing?

Why compare normalised option prices?

With continuous proportional dividends, compare C / (e−rTF(T)) at a fixed k = ln(K/F(T)). Interest, dividends and the changing strike matter. A fall in total implied variance breaks consistency of these normalised prices.

Bars: the blocks of variance added by each quarter, Q1 at the bottom. Solid line: the total variance w(T). Dashed: σ²·T for the flat σ.
Thick grey steps: the forward volatility of each quarter. Smooth line: the implied volatility, the average so far. Dashed: the flat σ.

Three things to try. First, pick "Calm after a storm": the implied volatility falls from 40% to 23.8%, yet the total variance still grows, because a calm quarter adds only a small block, which pulls the average down but still adds to the total. Second, try to make the total variance go down: no slider position can, since every block is a square times a positive stretch of time. Third, switch between "Calm after a storm" and "Storm ahead": both end the year with the same total variance, so a 1-year at-the-money option costs the same, although the year unfolds completely differently.

Key takeaway: in this time-dependent volatility model, variance blocks only add up. Implied volatility is the square root of the average variance rate; forward volatility describes a future interval.

Chapter 4

Flat volatility vs. the smile

The Black-Scholes model uses one single volatility for every option on a stock. If that were true, the volatility you can back out of market option prices, the implied volatility, would be a flat line across strikes.

Real markets disagree. Options that protect against a crash (low strikes) cost more than the model says, so their implied volatility is higher. Plotted against the strike, implied volatility curves up like a lopsided smile. In plain words: the market charges more for protection against crashes.

We describe the smile with a few dials: the at-the-money level, the skew (tilt) and the curvature (bend), plus straight "wings" far from the money. The position is measured in log-moneyness k = ln(K/F(T)): k = 0 is a strike equal to the forward, and k = −0.1 is a strike about 10% below it.

Formula
σimp(k) = atm + skew·k + curvature·k²for kL ≤ k ≤ kR σimp(k) ≈ σimp(kL) + leftSlope·(k − kL)for k < kL σimp(k) ≈ σimp(kR) + rightSlope·(k − kR)for k > kR

In words A parabola in the middle and straight lines in the wings, joined by a short smooth bend (hence the ≈), used for every maturity and always kept between 1% and 300%.

Local volatility lets the size of random moves depend on stock price and time. Dupire’s formula constructs this function from a smooth, consistent surface of European option prices. Our finite grid, volatility bounds and edge extrapolation approximate that construction.

Formula

dS = (r − q)·S·dt + σloc(S, t)·S·dW

σloc² = ∂w/∂T1 − kw∂kw + ¼(−¼ − 1w + k²w²)(∂kw)² + ½∂kkw

In words: the formula reads local volatility from the tilt and bend of total implied variance. A negative denominator indicates a negative probability density. A zero or very small denominator makes local volatility undefined or unstable. The time derivative is taken at fixed k, not fixed strike.

The numerator is the growth rate of total implied variance at a fixed strike relative to the forward. Our time-independent smile makes it positive. We also check the denominator on a finite grid; this does not guarantee that the smile is valid at every possible strike.

Even though our smile is the same for every maturity, local volatility changes with time. With the default curved smile, it becomes lower and flatter near the money at later times. Try other settings: this pattern depends on the smile’s tilt and bend.

Near the money and at short maturities, a smooth smile gives a local-volatility slope close to twice its implied-volatility slope. Longer maturities also depend on curvature. Where a wing joins the centre, changes in curvature can create a bump.

Shape the smile

Implied volatility (the smile) against strike K. Dashed: flat Black-Scholes.
Local volatility against spot S at time t = T. Thin: the smile, for comparison.

The surfaces in 3D

Drag to rotate, use the wheel or pinch to zoom, double-click to reset. With the keyboard: focus the chart, then arrow keys and + / −. Colour shows height (dark = low, yellow = high). Red hatching marks undefined or unstable local volatility.

Key takeaway Black-Scholes uses a flat volatility, but markets show a smile. Under suitable smoothness and consistency conditions, local volatility reproduces a chosen smile. Our simulation approximates it with finite time steps and a bounded grid.

Chapter 5

Showdown: pricing options by Monte Carlo

Both models use the same random increments in the path and pricing labs. Differences reflect the volatility model and, for local volatility, its time-step and grid approximations.

Formula

ln Si+1 = ln Si + (r − q − ½σloc²)·Δt + σloc(Si, ti)·√Δt·Zi

In words: use normal random increments as in Chapter 3, but look up volatility at the current stock price and time. Updating it only once per step introduces a time-step error, separate from Monte Carlo sampling error.

Shared parameters

These are linked to Chapters 3 and 4: change them here or there. Change the smile in Chapter 4.

5.1 Paths and distributions

Black-Scholes paths (flat volatility).
Local-volatility paths, same random numbers.
Histograms of ST from 1,000 paths per model: Black-Scholes and local volatility. Theory: solid = lognormal (Black-Scholes), dashed = density implied by the smile.

The 5% quantile means about 5 in 100 paths finish below that price. Compare it with flat Black-Scholes, and check the share finishing below 70% of today’s spot. Skewness and excess kurtosis describe shape but are noisy in a small sample; high kurtosis alone does not identify a heavier left tail.

Formula

density(K) = erT · ∂²C∂K²

In words Call prices across strikes reveal the risk-neutral probabilities: how sharply the price curve bends at a strike tells how likely the stock ends up near it (Breeden-Litzenberger).

Key takeaway: our chosen smile can assign more weight to low terminal prices than flat Black-Scholes. The result depends on the smile and the numerical approximations.

5.2 From a distribution to a price

A European call is the right to buy the stock at the strike K on the maturity date T. A put is the right to sell. You only use the right when it pays, so the payoff is never negative.

Change the strike: how do the call and put prices move? Their paths stay the same. To check numerical error, compare 50, 100 and 200 local-volatility steps.

Payoff at maturity: call max(ST − K, 0) solid, put max(K − ST, 0) dashed.

The Monte Carlo recipe

  1. (a) Simulate many final prices ST.
  2. (b) Pay out: compute the payoff on each path.
  3. (c) Average and discount back to today.
Formula

Price ≈ e−rT · 1N · Σ payoff(ST(i))

SE = s√N, 95% CI = Price ± 1.96·SE

In words The price is the average payoff over many simulated futures, brought back to today's money; the standard error SE (with s the spread of the discounted payoffs) says how much that average could still wobble, and the approximate 95% confidence interval (CI) describes sampling uncertainty, with about 95% coverage over many independent runs when the approximation is reliable.

Why the drift r − q and not the stock's expected real-world return? Because the option can be copied by trading the stock and cash. The cost of that copy does not depend on how fast anyone expects the stock to grow, and computing it is the same as averaging with the risk-neutral drift.

For antithetic paths, the SE formula uses the number of independent pairs and the spread of their averaged payoffs: 10,000 paths give 5,000 independent pairs.

To check the simulation we compare with exact formulas. For Black-Scholes:

Formula

d1 = ln(S0/K) + (r − q + σ²/2)·Tσ·√T, d2 = d1 − σ·√T

Call = S0e−qT·Φ(d1) − Ke−rT·Φ(d2)

Put = Ke−rT·Φ(−d2) − S0e−qT·Φ(−d1)

In words This is the exact average of the discounted payoff when the stock follows GBM, where Φ(d) is the area under the bell curve φ from Chapter 1 to the left of d.

For local volatility the reference is the same formula with the smile's volatility σimp(K) plugged in: the target price from your chosen smile. A final check is put-call parity: Call − Put = S0e−qT − Ke−rT, true in every model.

Discounted payoffs of the chosen option on each path (first 5,000 paths shown). The spike at zero is all the paths where the option expires worthless.

5.3 How fast does it converge?

With independent paths, sampling uncertainty typically shrinks like 1/√N. The realised error can still move up or down as paths arrive. Antithetic variates pair a path with its mirror image (Z and −Z), which reduces variance for many payoffs. Switch them on and compare the bands.

Running MC price with its approximate 95% sampling band. Theory. With antithetic variates on, grey shows the plain estimate for comparison.
Error |MC − theory| against N (log-log). Dashed: the 1/√N rule. 100× more independent paths typically makes sampling uncertainty about 10× smaller. A single run’s error need not fall steadily.

Repeat the experiment

Run the same pricing 200 times with fresh random numbers and plot the 200 prices. The result is a bell curve again, Chapter 1 in disguise: an average of many random payoffs is approximately normal.

200 MC prices. Target price and the approximate bell curve predicted by the Central Limit Theorem.

5.4 The smile through prices

Price options across strikes and turn each Monte Carlo price back into implied volatility. Below the forward we use puts; above it we use calls, following a forward-moneyness convention. The ITM/ATM/OTM tags in 5.2 instead compare the strike with today’s spot. This graph shares the paths from 5.2 and also starts the calculation when visited directly.

Your smile. Squares: Black-Scholes MC. Circles: local-volatility MC. Bars: available 95% sampling intervals. Hollow markers have large uncertainty or an unavailable IV interval.

Key takeaway An ideal local-volatility model targets the chosen smile. The points here also reflect sampling, time-step and grid errors.

Conclusion

So, can we price derivatives by a coin toss?

  1. 01Sums of tosses make a bell curve
  2. 02A fast coin-toss walk is Brownian motion
  3. 03Multiplicative walks average to the forward
  4. 04A smile becomes a local-volatility surface
  5. 05The average discounted payoff is the price

Yes, as a starting idea. Many small coin-toss steps approach Brownian motion. We generate its normal increments directly to build stock-price paths, then average discounted option payoffs. Sampling uncertainty typically shrinks like 1/√N. Local-volatility time-step and grid errors remain even with many paths.

Of the two models here, local volatility is constructed to match a chosen, consistent smile. Other models can also describe a smile. Matching option prices today is not a forecast of future stock prices.

Where the models stop

Glossary

Volatility
The annualised spread of log returns in this model. A volatility of 20% describes the size of random moves; it is not an exact ±20% interval for the yearly percentage return.
Dividend yield
The part of the stock price paid out each year as dividends, as a percentage. We assume it is paid continuously.
Risk-free rate
The interest rate on a loan with no risk of default. For pricing we pretend that every asset grows on average at this rate (minus dividends), the so-called risk-neutral world, because options can be copied by trading.
Forward
The fair price, agreed today, for buying the stock at a future date. It equals today's price grown at the rate minus the dividend yield.
Implied volatility
The volatility you must put into the Black-Scholes formula to get an option's market price. It is a way to quote prices.
Total variance
For volatility depending only on time, the variance of the log price is w = ∫σ(t)²dt. With a smile, total implied variance w(k,T) = σ_imp(k,T)²T quotes option prices at each strike and is not generally Var(ln S_T).
Forward volatility
In the time-dependent volatility lab, the square root of the variance added per year between two future dates. With a smile, the same calculation describes forward implied variance, not a forecast of realised volatility.
Calendar arbitrage
Inconsistent option prices across maturities. With our proportional dividends, total implied variance must not fall with maturity at a fixed strike relative to the forward. This compares normalised prices, not simply the cash prices of two options.
Local volatility
Volatility depending on stock price and time. An ideal local-volatility model reproduces European option prices from a smooth, arbitrage-free surface; numerical grids, caps and extrapolation can introduce differences.
Skew
The tilt of the smile. Negative skew means low strikes (crash protection) have higher implied volatility.
Curvature
How much the smile bends upward on both sides of the money.
Call
The right, but not the obligation, to buy the stock at the strike price on the maturity date.
Put
The right, but not the obligation, to sell the stock at the strike price on the maturity date.
Strike
The fixed price at which an option lets you buy (call) or sell (put) the stock.
Payoff
What an option pays at maturity: max(S − K, 0) for a call and max(K − S, 0) for a put.
Monte Carlo simulation
Estimating a number by averaging over many random experiments, named after the casino.
Standard error
How much a Monte Carlo average would typically change with fresh independent samples. Its usual scale is proportional to 1/√N; model and numerical errors are separate.
Antithetic variates
Pairing random increments Z and −Z to reduce sampling variance for many payoffs. Standard errors use independent pair averages; the reduction is not guaranteed for every payoff.
ITM / ATM / OTM
In, at or out of the money: if the option expired today, it would pay something (ITM), sit right at the strike (ATM), or pay nothing (OTM).