Where the Black–Scholes formula comes from
If you sell an option, can you trade the stock to cancel its risk?
In the standard model of stock prices, yes, up to a leftover risk. That leftover shrinks toward zero as you trade more often. The money needed to start the hedge is the option's price.
Before you start · 3 quick checks on the normal distribution and Itô's lemma, about 2 min
You are the hedger
You have sold one call on a $100 stock and collected the premium. The call expires in 3 months. The price is revealed at 8 dates, and at each one you choose how many shares to hold until the next.
Over a short time, the call's value changes by about \(N(d_1)\) dollars for each $1 move in the stock. Holding \(N(d_1)\) shares cancels that first-order part of the risk.
In this model, given the current stock price and time, \(N(d_1)\) minimizes the leading-order conditional variance of the hedged position's change over the next short interval. This does not guarantee the smallest terminal P&L spread with finitely many rebalancing dates.
What remains comes from the curvature of the call value (gamma) between dates, and it shrinks as the dates get closer together. On one path any holding can come out ahead by luck, so the autopilot compares spreads over 2,000 paths.
Autopilot: the formula hedge on 2,000 paths
Guess first, then see the result. Each guess reveals the next number of rebalancing dates.
What the hedge costs
The desk started with only the premium and paid every later trade from the cash account. That was enough: the hedged outcomes average close to zero. In the model with continuous trading, the starting cash needed to copy the call exactly is its Black–Scholes price.
How the simulation works
- The desk sells one European call on one share of a hypothetical stock with \(S_0 = 100\), strike \(K = 100\), maturity \(T = 0.25\) years, risk-free rate \(r = 5\%\) and volatility \(\sigma = 20\%\). It charges the Black–Scholes price.
- The stock follows geometric Brownian motion with real-world drift \(\mu = 10\%\).
- Unhedged. The desk receives the premium at \(t = 0\), keeps it in a cash account that earns \(r\), and pays the payoff \((S_T - K)^+\) at \(T\). Its terminal P&L is \(C_0e^{rT} - (S_T - K)^+\).
- If the call expires worthless, the desk keeps the premium plus interest, \(4.6150\,e^{0.0125} = \$4.6730\) in this example. The loss grows with \(S_T\) above the strike.
- Hedged. The desk sets its holding to \(\Delta_k = N(d_1)\), evaluated at the current price and remaining maturity, at \(t_k = kT/N\) for \(k = 0,\dots,N-1\), and liquidates at \(T\).
- The first purchase and every later trade are paid from or into the cash account, which earns or pays \(r\). At \(T\) the desk pays the payoff and sells the shares. The P&L is the cash left at \(T\).
- \(N\) counts rebalancing intervals over the whole 3-month life. With 63 trading days in 3 months, \(N = 63\) is about one rebalance per day.
- In the game, \(N = 8\). In the autopilot, each value of \(N\) uses its own 2,000 paths, generated from the seed below. Each game round uses a new path from the same seed.
The price does not depend on the expected return
Explorer: reach the goals
Drag the inputs until the goal turns green. The first tile below is the formula price. The second estimates the same number by simulation.
More inputs
What if you price with the expected return μ?
This box averages the payoff with real-world probabilities, using drift \(\mu\), and discounts at \(r\). Compare it with the price.
The PDE and the formula
The idea in three steps
- Hold some shares plus cash so that the portfolio's value always matches the option's value.
- Matching the random parts fixes the share count at \(V_S\). Matching the rest gives an equation in which \(\mu\) cancels.
- That equation is the Black–Scholes PDE. Solving it with the payoff at maturity gives the formula.
Itô's lemma refresher
If \(dS = a\,dt + b\,dW\) and \(f(t,S)\) is \(C^{1,2}\), then
\[ df = \Big(f_t + a f_S + \tfrac12 b^2 f_{SS}\Big)\,dt + b f_S\,dW. \]Intuition: in a Taylor expansion of \(f\), \((dW)^2\) behaves like \(dt\), so the term \(\tfrac12 f_{SS}(dS)^2\) contributes \(\tfrac12 b^2 f_{SS}\,dt\) and does not vanish.
Full derivation: the PDE (7 lines, build it or read it)
Assumptions.
- The stock follows \(dS_t = \mu S_t\,dt + \sigma S_t\,dW_t\), with \(S_0 > 0\).
- The rate \(r\) and the volatility \(\sigma > 0\) are constant; the strike \(K > 0\) and maturity \(T > 0\) are fixed.
- No dividends, no transaction costs, continuous trading, no arbitrage. Borrowing and lending at \(r\) are unlimited, and short selling is allowed.
- The option value is \(V(t,S)\), with \(V \in C^{1,2}\) on \([0,T)\times(0,\infty)\) and \(V\) continuous on \([0,T]\times(0,\infty)\). At \(t = T\) the payoff \((S-K)^+\) is not differentiable at \(S = K\), so smoothness is assumed only before maturity.
Conclusion. \(V\) satisfies
\[ V_t + \tfrac12\sigma^2 S^2 V_{SS} + r S V_S - r V = 0 \quad\text{on } [0,T)\times(0,\infty), \qquad V(T,S) = (S-K)^+. \]This derivation finds the PDE that a smooth replicating price must satisfy. A complete proof also checks that the resulting strategy is admissible, self-financing, and replicates the payoff at \(T\); see Shreve, Stochastic Calculus for Finance II, ch. 4.
In the simulation of stage 1 the desk is short the call and holds the replicating portfolio, so its P&L is \(X_T - V(T,S_T)\), which is 0 under continuous rebalancing.
Full derivation: the formula (6 lines)
Under the assumptions of the PDE derivation, for the call-price solution of the PDE with at most linear growth in \(S\), the Feynman–Kac representation gives the time-0 price
\[ V(0,S_0) = e^{-rT}\,\mathbb E^{\mathbb Q}\big[(S_T-K)^+\big], \qquad S_T = S_0 \exp\!\Big(\big(r - \tfrac12\sigma^2\big)T + \sigma\sqrt T\,Z\Big), \]where \(Z \sim N(0,1)\) under the risk-neutral measure \(\mathbb Q\). Write \(\varphi\) and \(N\) for the standard normal density and CDF, and define
\[ d_2 = \frac{\ln(S_0/K) + (r - \tfrac12\sigma^2)T}{\sigma\sqrt T}, \qquad d_1 = d_2 + \sigma\sqrt T. \]\(V(0,S_0) = S_0 N(d_1) - K e^{-rT} N(d_2)\).
Problems
All prices are hypothetical.
More problems
Further reading
- J. C. Hull, Options, Futures, and Other Derivatives, the chapter on the Black–Scholes–Merton model.
- S. E. Shreve, Stochastic Calculus for Finance II: Continuous-Time Models, chapters 4 and 5.
- F. Black and M. Scholes, "The Pricing of Options and Corporate Liabilities," Journal of Political Economy (1973).
- R. C. Merton, "Theory of Rational Option Pricing," Bell Journal of Economics and Management Science (1973).