2.9
The Black–Scholes formula
Derive by integrating the lognormal against the payoff; what N(d₁) and N(d₂) mean; put–call parity; dividends; Black-76 for forwards and futures.
2.8 ended with the option price written as a risk-neutral expectation,
and with a Monte Carlo pricer that could estimate that expectation together with an error bar. This page shows that the same expectation can be done exactly. Because the terminal stock price under Geometric Brownian motion (GBM) is lognormal, the expectation becomes an ordinary integral, and that integral collapses into the Black–Scholes formula. The main result is that the Monte Carlo estimate, the integral and the closed form are not three different answers but three ways of looking at the same number. For the base case they all give 18.023, with Monte Carlo alone carrying sampling noise.
What this page shows, and how
Does the integral give the same number as the pricer? Start from 2.8's expectation, evaluate it directly as an integral, then compare the result with the Monte Carlo estimate and the closed form. The three approaches should agree.
What are and ? Derive the two thresholds from the algebra instead of introducing them up front, then measure the quantities they represent on simulated paths.
Where does the put come from? Derive the put from the same machinery, then show that put–call parity follows from a payoff identity and no-arbitrage rather than from the lognormal model.
What does the formula do at its edges? Push volatility, expiry and spot price into limiting cases and verify that the formula converges to the values earlier pages would predict.
What changes when the stock pays dividends? Replace the risk-neutral drift with , show where the dividend yield enters the formula, and rewrite the result in terms of a forward price.
Why can one formula price options on forwards and futures? Express the stock through the forward , producing Black-76 and showing that it is a re-spelling of the same argument rather than a new model.
The experiment — what was done
The experiment checks the expectation in several independent ways. The integral was evaluated both as an integral over the lognormal density in and as an integral over a standard normal variable after substitution. Both were compared with the closed form and with fresh Monte Carlo runs using exact terminal draws. The comparison of integral and closed form was repeated across a 216-point grid spanning spot, strike, volatility, rate, dividend yield and expiry; the Monte Carlo runs were made at the base case and at two dividend yields.
The page then probes the formula's limits. Volatility is driven towards zero, expiry towards zero, spot is sent towards infinity and towards zero, and the convergence rates at each edge are recorded rather than assumed.
The dividend version of the formula and its Black-76 form are checked against quadrature, simulation and forward-price identities. Finally, the derived formula is tested against an oracle in three layers: live QuantLib calculations on the page grid, the same QuantLib engine used to generate the project's reference values, and all 7,234 rows of the committed golden file.
This is the first study page on which QuantLib appears. The rule is unchanged: QuantLib is the oracle, never a dependency. The page derives the formula independently and then checks that the oracle computes the same result.
The closed form of this page against QuantLib, from the committed
experiments/2_9_black_scholes_formula.json:
results.oracle.live.{version,grid,engine_base_case} and
results.oracle.golden.{oracle,cases,edge_cases,tolerance_rule}. The first two rows
are absolute errors; the golden rows use the file's own rule, absolute below 1 and
relative above it. The delta compared is for a call, and for a put
that less .
| comparison with the oracle | points | worst price error | worst delta error | tolerance |
|---|---|---|---|---|
QuantLib 1.43 BlackCalculator at the page's grid, call and put | 216 | |||
QuantLib AnalyticEuropeanEngine on a BlackScholesMertonProcess on dates, the golden generator's engine, base case | 1 | |||
golden/bs_vanilla.json grid cases, generated by QuantLib 1.43 | 7,200 | the file's: , relative above 1 | ||
| its edge cases (one-day, near-zero and very high vol, deep in and out of the money, negative rate, ten-year, tiny and large spot) | 34 | the file's: |
The integral and its two pieces
The derivation starts exactly where 2.8 stopped:
Under the risk-neutral measure, GBM gives
with a standard normal draw — 2.6's exact draw with in the drift slot (2.8) — so the expectation can be expressed as an integral over a single standard normal variable. The pricing problem has become a calculus problem.
The next step is to split the payoff at the strike:
which turns the call into two expectations,
These are the two quantities measured in the next section. The second counts the probability of exercising. The first counts the stock value delivered by the exercising paths. Together they reconstruct the option price. The table below shows that whichever route we take, Monte Carlo, quadrature in , quadrature in , or the closed form, the answer is 18.023, and the Monte Carlo estimate, 18.011 ± 0.031, agrees within its error bar.
, , , , . Seed 20261105, from the
committed experiments/2_9_black_scholes_formula.json: results.base.{call,put,d1,d2},
results.integral.base.{call_S_space,call_z_space,put_S_space},
results.integral.grid.{n_points,max_abs_error_call_S_space,max_abs_error_call_z_space,max_abs_error_put,max_abs_error_stock_piece,max_abs_error_strike_piece}
and results.mc.q_0.{call,put}.{mean,se_of_mean,error_in_se}. Quadrature is composite
Gauss–Legendre, 64 panels of 32 nodes. The formulas in the last column say how each
row was computed; they are not measurements.
| view | call | put | how |
|---|---|---|---|
| closed form | 18.0229514502 | 13.1458939003 | ; , |
| the integral in | 18.0229514502 | 13.1458939003 | against the lognormal density; differs from the closed form by |
| the integral in | 18.0229514502 | — | ; |
| Monte Carlo, exact draws | 18.011 ± 0.031 | 13.122 ± 0.017 | −0.4 s.e. and −1.4 s.e. |
| across 216 points of | the worst on the grid; both pieces |
What and mean
The symbols are produced by the algebra rather than assumed at the start.
The first threshold appears when we ask which paths exercise. Writing the exercise condition in terms of the normal variable produces
with
Since the probability that the condition holds is just the area above the threshold,
So is the risk-neutral probability of exercise. In the base case it is 0.470, measured as 0.4707 ± 0.0005 in simulation.
The second threshold appears when evaluating the stock piece. Completing the square shifts the normal distribution by , producing
That shift converts the stock piece into
What does mean? It is not the risk-neutral probability of exercise. Instead,
It measures how much of the stock's forward value comes from exercising paths. Equivalently, it is the exercise probability under the stock-weighted measure produced by the same exponential reweighting discussed in 2.8.
That weighting favours high- paths, so
Here the values are 0.627 and 0.470 respectively.
The same draws at , from
results.mc.q_0.{exercise_probability,strike_piece,stock_piece,share_measure_probability,E_S_T,conditional_mean_given_itm,call},
beside the closed forms in results.base and the bump delta
results.delta.{bump_delta,N_d1,h}. The share row is a ratio of two means, with its
delta-method standard error. The last column names each row's place in the formula,
and the conditional mean has none.
| quantity | measured on draws | closed form | in the formula |
|---|---|---|---|
| — the probability of exercise | 0.4707 ± 0.0005 | 0.4701 | |
| — the strike piece | 44.77 ± 0.05 | 44.718 | |
| — the stock piece | 62.79 ± 0.07 | 62.741 | |
| — the share of the stock's value from the exercising paths | 0.6278 ± 0.0005 | 0.6274 | |
| by a central bump of the closed form, — the delta | 0.62741 | 0.62741 | |
| — the forward price | 105.14 ± 0.04 | 105.127 | |
| — the average stock price on the exercising paths | 140.23 ± 0.06 | 140.304 | — not in the price |
| the stock piece minus the strike piece | 18.011 ± 0.031 | 18.023 |
The same quantity is also the delta:
which links this page directly back to the hedge studied in 2.7.
A useful trap is the conditional mean
This equals roughly 140.3 in the base case, but it never appears in the pricing formula. The picture is two densities over the same strike: is the area above under the -density of , while is the area above the same under the stock-weighted density.
The put, and parity
The same derivation can be run on the other side of the strike, producing
For the base case the put is worth 13.146.
More important than the formula itself is the parity relationship. Path by path,
This identity is true regardless of any distributional assumptions. Taking discounted risk-neutral expectations gives
The value is 4.877 in the base case.
From results.base.{call_minus_put,forward_no_arbitrage},
results.parity.grid_max_abs_error and, on the same draws as the call and the put,
results.mc.q_*.parity.{per_path_identity_max_abs,mc_difference.{mean,se_of_mean,error_in_se}},
with results.mc.q_*.forward_no_arbitrage and results.mc.q_0.E_S_T.sd. The
and rows are separate runs of draws each, with the drift
.
| parity on the base case | value | note |
|---|---|---|
| closed form: | 4.8771 | 18.0230 − 13.1459; across the 216-point grid |
| no-arbitrage: | 4.8771 | 2.8's forward, no model |
| per path: max on draws | 0 | an identity, exact in floating point too |
| Monte Carlo: the call's estimate minus the put's on the same draws | 4.889 ± 0.042 | +0.3 s.e.; the s.e. is the forward's (the of is 41.6), larger than the call's 0.031 |
| with : , and | 1.9216; Monte Carlo 1.958 ± 0.040 | +0.9 s.e. |
| with | −2.8113; Monte Carlo −2.832 ± 0.038 | −0.5 s.e.; the forward below the strike, the put dearer than the call |
The key point is that parity does not require the lognormal model. It follows from no-arbitrage and the payoff identity alone. The D6 pricer makes this visible: the vertical separation between the call and put curves is always the forward line.
- price
- 18.0230
- payoff now
- 0.0000
- price − payoff
- 18.0230
- moneyness S/K
- 1.000
| Greek | raw ∂ | as quoted |
|---|---|---|
| delta ∂V/∂S | 0.627409 | 0.6274 per 1.00 of spot |
| gamma ∂²V/∂S² | 0.009460 | 0.0095 delta per 1% of spot |
| vega ∂V/∂σ | 37.841983 | 0.3784 per vol point |
| theta ∂V/∂t | −9.804296 | −0.0269 per day |
| rho ∂V/∂r | 44.717995 | 0.004472 per basis point |
| ∂V/∂q | −62.740946 | −0.006274 per basis point |
The curve meets the payoff only at expiry. Shorten the expiry and watch it fold onto the kink; that folding, per day, is theta. The curve's slope at the marked spot is delta (0.627) and its curvature is gamma; the two are why a hedged book is never quite hedged between rebalances, which is what D5 measures. The price sits 18.02 above the payoff — what the remaining optionality is worth. Every number on this page comes from the same code the library's C++ mirrors, held to the QuantLib golden file to 1e−10.
The edges
A pricing formula earns trust at its limits before it earns trust in the middle.
As volatility tends to zero, uncertainty disappears and the terminal stock price collapses onto the forward. The option therefore converges to
As expiry tends to zero there is no time left for movement, so the option converges to its intrinsic value,
As spot tends to infinity, both and approach one. The call converges to the forward value,
As spot tends to zero, both probabilities vanish and the option price vanishes with them.
The closed form at , , , from
results.limits.sigma_to_0.rows.{S0_90,S0_95.123,S0_100,S0_110}.rows[*].{x,call,gap,gap_over_sigma}
and results.limits.sigma_to_0.{kink_slope_measured,kink_slope_expected}. Each column
heading names its limit, ; 95.123 is , the spot at
which the forward equals the strike. The bracketed figures are the gap to the limit,
or the formula for the slope.
| () | at : | ||||
|---|---|---|---|---|---|
| 12.2497 | 15.0788 | 37.70 | 18.0230 | 24.7413 | |
| 0.1 | 1.6806 | 3.7933 | 37.93 | 6.8050 | 15.2101 |
| 0.01 | 0.37948 | 37.948 | 4.87706 () | 14.8771 | |
| 0 | 0.037949 | 37.949 | 4.87706 | 14.8771 | |
| 0 | 37.949 () | 4.87706 | 14.8771 |
The closed form at , , , from
results.limits.T_to_0.rows.{S0_90,S0_100,S0_110}.rows[*].{x,call,gap,gap_over_sqrtT,N_d1,N_d2}
and results.limits.T_to_0.{kink_slope_measured,kink_slope_expected}. Each column
heading names its limit, . The bracketed figure is the formula for
the slope. and are in results.limits.{S0_to_inf,S0_to_0}.
| at : | at | ||||
|---|---|---|---|---|---|
| 12.2497 | 18.0230 | 18.02 | 0.627 · 0.470 | 24.7413 | |
| 0.1 | 1.4539 | 5.2836 | 16.71 | 0.541 · 0.491 | 12.1073 |
| 0.01 | 0.0052 | 1.6204 | 16.20 | 0.513 · 0.497 | 10.0616 |
| 0 | 0.15983 | 15.98 | 0.5013 · 0.4997 | 10.0005 | |
| 0 | 0.015960 | 15.960 () | 0.5001 · 0.5000 | 10.000005 |
The tables do more than confirm the limits. They measure the rates of convergence. At the kinks, convergence slows to linear in and proportional to , giving precise benchmark slopes that a correct implementation must reproduce. The D6 pricer shows the call curve collapsing onto its payoff as expiry approaches zero.
A dividend yield, and Black-76
With a continuous dividend yield , the holder of the stock receives cash flows that the option holder does not. Under the risk-neutral measure the stock price therefore drifts at
Repeating the derivation changes the stock term to
and replaces by inside and .
The result is a cheaper call and a dearer put. At the call falls from 18.023 to 16.211.
The next step is to write everything through the forward price
The formula becomes
with and .
This is Black-76. The important observation is that disappears from entirely and survives only in the discount factor. The dividend yield disappears into the forward. What looked like a new formula is really the same derivation written in terms of a traded forward price.
, , , at three yields, from
results.dividends.q_rows.q_*.{q,F,S0_e_qT,closed_form_call,black76_call,closed_form_d1,black76_d1,closed_form_put,forward_no_arbitrage}
and, from draws at each yield, results.mc.q_*.call.{mean,se_of_mean}. The
monotonicity across the grid is
results.dividends.{call_decreasing_in_q_everywhere,put_increasing_in_q_everywhere}.
| drift | closed form with | Black-76 with | (both) | Monte Carlo, drift | put | forward | |||
|---|---|---|---|---|---|---|---|---|---|
| 0 | +0.05 | 100.000 | 105.127 | 18.022951 | 18.022951 | 0.325 | 18.011 ± 0.031 | 13.146 | 4.877 |
| 0.03 | +0.02 | 97.045 | 102.020 | 16.210727 | 16.210727 | 0.250 | 16.229 ± 0.029 | 14.289 | 1.922 |
| 0.08 | −0.03 | 92.312 | 97.045 | 13.491561 | 13.491561 | 0.125 | 13.494 ± 0.027 | 16.303 | −2.811 |
The oracle checks then confirm that every spelling produces the same value: Black–Scholes with dividends, Black-76, quadrature and QuantLib to machine precision, and the simulation within its standard error.
Into 2.10
This page produced the pricing formula. The next page asks how that price changes when the inputs move.
Delta has already appeared as , first as a hedge ratio in 2.7 and now as a derivative of the formula itself. 2.10 differentiates the remaining pieces and introduces the rest of the Greeks: the delta's own sensitivity to spot, and the price's to volatility, time and the rate. The D6 pricer displays these quantities; the next step is to understand what each one measures, why traders watch it, and how it emerges directly from the formula derived here.
Check
The Black–Scholes call price C = S₀N(d₁) − Ke^(−rT)N(d₂) is:
In the formula, N(d₂) = 0.470 here. It is:
N(d₁) = 0.627 here, above N(d₂) = 0.470. N(d₁) is:
Put–call parity, C − P = S₀ − Ke^(−rT) = 4.88 here, holds:
With S₀ = 100, K = 100, r = 0.05, T = 1, as σ → 0 the call price tends to:
A stock pays a continuous dividend yield q = 3 %. Compared with q = 0, the call price (18.02):