A step-by-step derivation of the Black–Scholes equation — geometric Brownian motion, Itô's lemma, the replicating portfolio, the PDE and risk-neutral valuation — followed by three ways to price the same option, an implied-volatility solver, the volatility smile, and a simulation of what delta-hedging actually earns.

Module 03 · The equation, from first principles

Deriving Black–Scholes

The formula looks like it fell out of the sky. It didn't — it falls out of one idea repeated four times: if you can build a thing out of stock and cash, its price can't be anything other than what building it costs. Everything below is that sentence, made precise.

Every coloured, underlined symbol, , — opens a full explanation with a worked example. The nine sections run in order: the first four build the equation, the next three price with it, the last two test it until it breaks.
01 — The Model of a Stock

A drift, and a coin flipped forever

Before you can price an option you need a story for how the stock moves. Black and Scholes chose the simplest one that can't go bankrupt by accident: . Returns — not prices — are random, drawn fresh each instant from a bell curve. The result is a price: it can double, but it can never go negative.

d = ·S·dt + ·S·        ST = S₀·exp[ (μ − σ²/2)T + σ√T· ]
outcome
$110
grows at μ − σ²/2
Mean outcome
$116
grows at μ
−4.5%/yr
σ²/2, the gap
P(ends above start)
57%
typical < average
Simulated paths · gold = median, dashed = mean
Where they end up — the lognormal, and its long right tail

The asymmetry that explains everything downstream. The average path and the typical path are different animals, and the gap is exactly . A stock that gains 50% then loses 50% is down 25% — losses hurt more than equal-sized gains help, so the median lags the mean. That single term is why leverage has a ceiling on the Desk, and it is the same term you'll meet inside in about four minutes.

Try this
DoPush σ to 80% and leave the drift at 10%.
WatchThe median outcome falls below the starting price while the mean keeps climbing — a positive-drift asset whose typical path loses money.
WhyCompounding is multiplicative. The drag σ²/2 = 32% a year now swamps a 10% drift. Volatility is not just risk; at high enough levels it is a cost.
02 — Itô's Lemma

Calculus for things that jitter

Ordinary calculus throws away (dx)² as too small to matter. That instinct is wrong for a random walk, because a covers √dt of ground in every dt of time — so (dW)² is the same size as dt and refuses to vanish. Keeping that one extra term is , and it is the whole reason option pricing needs its own mathematics.

(dW)² = dt      d(S,t) = (∂f/∂t + μS·∂f/∂S + ½σ²S²·)dt + σS·∂f/∂S·dW
The claim is testable. Chop one path into n pieces and add up the squared returns. Ordinary intuition says a finer chop gives a smaller sum. It doesn't — it converges to , dead on, every time.
Σ (Δln S)² —
0.0901
theory: σ²T = 0.0900
Σ |Δln S| — total travel
2.41
grows without limit
Chop finer → squared moves settle (gold), absolute moves diverge (blue)

Take the log of the price

Set f = ln S. Then ∂f/∂S = 1/S and ∂²f/∂S² = −1/S². Naïve calculus would stop at dS/S = μ dt + σ dW.

Keep the second-order term

Itô insists on the ½σ²S²·(∂²f/∂S²) piece, which here equals −½σ². It survives because (dW)² = dt, not zero.

d(ln S) = (μ − σ²/2)dt + σ dW

Read off the answer

The log-price is an ordinary random walk with constant drift, so it's normal — which makes S itself , and hands you the −σ²/2 you watched in section 01. The mathematics and the picture agree.

Try this
DoDrag the step count from 1 to 4000 and read both numbers.
WatchSquared moves lock onto σ²T no matter how fine the chop; absolute travel just keeps growing.
WhyA Brownian path is infinitely wiggly — infinite length, finite squared variation. Volatility is measurable from a single path; drift, notoriously, is not.
03 — The Replicating Portfolio

Cancel the randomness, and a price appears

Here is the trick the Nobel was for. Hold the option and short shares against it. Both legs are driven by the same dW, so at one specific h the random terms cancel exactly and you are left holding something riskless. A riskless thing must earn the — otherwise there is free money — and that requirement is the .

Π = V h·S      dΠ = (…)dt + σS( − h)dW      h = ∂V/∂S no dW at all
Turn the hedge ratio and watch the randomness of one day's P&L. It bottoms out — at zero, in this idealised instant — exactly at h = .
Option's own delta
0.637
the only h that works
Randomness left in P&L
$0.64
per $1 stock move

Unhedged: the option's P&L is pure exposure to the stock. Slide toward 0.64 to cancel it.

Risk of the combined position vs. hedge ratio — a V with its floor at Δ

Expand the option with Itô

dV = (∂V/∂t + μS·∂V/∂S + ½σ²S²·∂²V/∂S²)dt + σS·∂V/∂S·dW

The option inherits the stock's randomness, scaled by its own slope ∂V/∂S.

Subtract h shares

dΠ = dV − h·dS = […]dt + σS(∂V/∂S − h)dW

Two sources of dW, one dial. Set h = ∂V/∂S and the dW term is gone — not reduced, gone.

Notice that μ left with it

The drift term μS·∂V/∂S in dV is cancelled by −h·μS from the short. The stock's expected return has vanished from the problem. Nobody has to agree on μ to agree on the option's price.

Force it to earn the risk-free rate

Π is now riskless over the next instant, so no-arbitrage demands dΠ = rΠ dt. Substitute, cancel dt, rearrange:

∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0

That's the whole equation. With the payoff max(S−K,0) as its boundary condition at expiry, the solution is the closed form on the Greeks page.

The fine print that later cost real money. "Continuously" is doing heavy lifting: the hedge is perfect only if you can rebalance infinitely often, at no cost, in any size, with no gaps in the price. Every one of those is false. Section 08 puts a number on how false.

Try this
DoSet the hedge ratio to 1.00 — a full share against the call.
WatchRisk climbs back up. Over-hedging is as bad as not hedging; the V has one floor, not a plateau.
WhyYou have flipped from long stock-exposure to short. Only the option's own slope cancels its own randomness — which is precisely why delta is defined as that slope.
04 — Risk-Neutral Valuation

The most useful lie in finance

μ dropped out of the algebra, which licenses a strange move: since the answer doesn't depend on the real drift, pretend every asset drifts at the risk-free rate. In that imaginary world — the measure — today's fair price is just the expected payoff, discounted. Nobody believes it. Everybody prices with it, because it gives the right answer.

V₀ = e−rT·[ payoff(ST) ]      under ℚ:  dS = S dt + σS dW
Drag the stock's real-world expected return. The option price does not move a cent.
Real-world distribution (blue, moves) vs. pricing distribution ℚ (gold, fixed)

What's really going on. Nobody claims investors are indifferent to risk. The point is that the hedge already prices the risk — you're not forecasting the stock, you're costing a manufacturing process. Shifting to ℚ is a change of probability measure that leaves volatility alone and rewrites the drift, and it is legitimate precisely because a replicating portfolio exists. Where replication fails — an illiquid stock, a jump you can't trade through — the licence expires, and so does the price.

Try this
DoSet μ to −20%, then +40%, and read the option price each time.
WatchThe real-world chance of finishing in the money swings hugely. The price does not budge.
WhyA bull and a bear can hedge the identical option at the identical cost. Their disagreement is about direction; the option's cost is about movement.
05 — Pricing It By Brute Force

Simulate a million futures, take the average

Risk-neutral valuation is a literal instruction: simulate the stock under ℚ, collect the payoffs, average, discount. is slow and approximate where the closed form is instant and exact — but it prices things the formula can't touch, and watching it crawl toward $10.45 is the most convincing proof the formula is right.

= e−rT·(1/N)·Σ payoff(ST(i))      s/√N
Variance reduction: mirror every draw.
Monte Carlo price
$10.44
± $0.13 (1 s.e.)
Closed form
$10.45
the answer it's chasing
Error
−0.01
within 1 s.e.
To halve the error
40,000
paths needed — 4×
Running estimate vs. paths used · shaded = ±2 standard errors

The √N tax. Monte Carlo error falls with the square root of effort: 100× the computation buys 10× the accuracy. That is why real desks reach for variance reduction — pairs here roughly halve the error for free — and why nobody simulates a vanilla call in production. They simulate the things with no formula: path-dependent payoffs, baskets, early exercise, anything with a smile baked in.

Try this
DoSet N to 100, hit Resample five times, then set N to 200,000 and do it again.
WatchAt N = 100 the price jumps around by a dollar. At N = 200,000 it barely moves in the second decimal.
WhyEach estimate is itself a random variable. The band on the chart is the honest statement of what you know — a Monte Carlo price without an error bar is not a price.
06 — The Binomial Tree

The same idea, in slow motion

Shrink reality to one step where the stock can only go up or down. Then the replicating portfolio is two equations in two unknowns — solvable by a teenager — and the option price follows with no calculus at all. Let the steps get small and the tree converges to Black–Scholes. It is the derivation you can do on a napkin, and it handles , which the formula cannot.

u = eσ√Δt,   d = 1/u      = (erΔt − d)/(u − d)      V = e−rΔt[ p·Vu + (1−p)·Vd ]
Tree price
$10.38
u 1.041 · d 0.961 · p 0.501
Black–Scholes
$10.45
gap −$0.07
Tree price vs. number of steps · dashed = the closed form

Read the zig-zag. Convergence isn't smooth — it oscillates, because whether a node lands exactly on the strike flips with every added step. Odd and even step counts approach from opposite sides, which is why practitioners average adjacent trees or use a tree that pins a node to the strike. Switch to an American put and the two prices separate permanently: that stubborn gap is a real, tradable right the closed form has no way to express.

Try this
DoChoose American + Put, then walk the steps up from 1 to 300.
WatchThe tree settles above Black–Scholes and stays there. With a call, the premium is zero instead.
WhyExercising a put early hands you cash that earns interest — sometimes worth more than the remaining optionality. For a call on a non-dividend stock it never pays, so the American call equals the European one. The tree discovers that on its own.
07 — Running It Backwards

The one input you can't look up

Spot, strike, time and rate are facts. is a forecast — and it's the only unknown, so the market's price of an option is a statement about it. Invert the formula and you get . There's no algebraic inverse, so you search: guess, price, correct, repeat. gets there in about four steps.

Implied volatility
23.4%
found in 4 iterations
What it's saying
±1.47%
expected daily move
Now do that for every strike at once. If the world were really lognormal, the answer would be a flat line. It never is — this is the , and it's the market pricing in the crashes Black–Scholes forbids.
Implied vol by strike · dashed = the flat line the model assumes

The smile is the model's own confession. Traders quote in vol because it strips out the mechanical inputs and leaves the argument. But if the model were true, one σ would price every strike on the board. Instead, out-of-the-money puts trade at a fatter vol than calls — crash insurance is dear, and equity returns are left-skewed. Since 1987 that has never gone away. Practitioners kept the formula anyway, downgraded to a quoting convention: a bad model everyone agrees on beats a good model nobody shares.

Try this
DoDrag the market price to its top, then read the iteration table.
WatchEach row's error shrinks roughly quadratically — three correct digits become six in a single step.
WhyNewton divides the pricing error by vega, the slope. Where vega is healthy that's a superb correction; for a deep out-of-the-money option vega is nearly zero, the step explodes, and the solver has to fall back to bisection. Robust implied-vol code is mostly about that failure case.
08 — The Delta-Hedging Lab

What the formula actually promises

Black–Scholes doesn't claim the option is "worth" $10.45 in some spiritual sense. It claims that $10.45 plus a program manufactures the payoff — exactly, every time. So: sell the call at the model price, hedge it a finite number of times, charge realistic costs, and run it a thousand times. Whatever's left over is the model's error, and its shape is the entire business of an options desk.

Average P&L
$0.00
per option sold at $10.45
(std)
$0.42
the model's residual risk
Worst 5% of runs
−$0.71
5th percentile
Runs that lost money
48%
of 1,000 simulations
P&L per option sold · gold line = break-even
Risk vs. re-hedge frequency · gold = error, red = costs, blue = total

Two laws fight over your hedging schedule. Hedge error falls like 1/√n — quadruple the re-hedges to halve the risk (Boyle–Emanuel). But costs rise like √n once you're paying spread on every trade (Leland). Their sum has a minimum, and that minimum — not "continuously" — is what a desk actually does. Set costs above zero and watch the blue curve grow a floor: past that point, hedging more often makes you worse off. Continuous hedging is infinitely expensive, which is the polite way of saying the model's central assumption cannot be purchased at any price.

Try this
DoSell at 30% vol while the stock only realises 20%. Then drag the re-hedge count down to 2.
WatchA 10-point vol edge hedged weekly looks like free money — almost no runs lose. Hedge only twice and roughly a fifth of them lose, some badly, on exactly the same edge.
WhyYour edge is (σimplied² − σrealised²) collected through gamma, a crumb at a time. Collecting it requires the hedging; skip the hedging and you're left with a naked directional bet that happens to have a good expected value. That distinction — edge versus the machinery that harvests it — is the whole short-vol business, and the Arbitrage Book trades it on purpose.
09 — Where It Breaks

Six assumptions, six ways to lose money

The equation is exactly right about a world that doesn't exist. Knowing which assumption is failing today — and in which direction — is most of what separates an options trader from a calculator. Here is the audit.

The model assumesRealityWhat it does to you
Prices move continuously A hedge set at $100 is useless if the stock opens at $70. Gaps are exactly when the hedge is missing, which is why the model undervalues out-of-the-money puts — and why the smile exists.
Volatility is constant and known Vol spikes exactly when you need to hedge most. A single σ can't fit both a calm month and a crash, so vega risk is real risk, not a rounding error.
Returns are normally distributed October 1987 was a −22% day: about a 20-sigma event, which a normal curve says happens once every 1070 years. It happened. Tail options are chronically cheap under the model.
Trading is free and frictionless Perfect replication needs infinite trading, so it costs infinity. Section 08 shows the compromise: hedge on a schedule and accept residual risk.
You can always short, borrow, and get filled Not in a crisis Liquidity vanishes precisely when correlations go to one. This is the mechanism that ended LTCM in 1998 — the arbitrage was right, and the funding wasn't there to hold it.
One constant risk-free rate Nearly true The mildest failure. Rho is small for short-dated options; long-dated books do care, and use a curve rather than a number.

So why is it still everywhere? Because it's wrong in a legible way. Every fix — local vol, stochastic vol, jump-diffusion — is described as a deviation from Black–Scholes, quoted in Black–Scholes vol points. The formula survived by demoting itself from a theory of prices to a shared language for disagreeing about them. That's not a failure. It's the most successful wrong model in the history of finance.

Where to go next
Trade itThe Arbitrage Book turns section 08 into a strategy: selling implied vol, variance swaps, and dispersion.
Size itThe Desk answers the question this page ignores — how much of the fund to put behind an edge you believe in.
Feel itThe Greeks is the same equation differentiated in every direction, with a live pricer.