AI // ENCYCLOPEDIA / QUANT / 05 / MONTE CARLO INDEX NEXT: RISK MEASUREMENT →
QUANTITATIVE FINANCE · CHAPTER 05 / 06

Monte Carlo Methods in Finance

A price is an expectation, and an expectation can be estimated by averaging samples. When no closed form exists, Monte Carlo simulates many futures and averages them, pricing options that analytic formulas cannot reach. Its error shrinks only as one over the square root of the sample size, so the practical work is reducing variance: antithetic pairs, control variates, and related techniques that make a slow estimator faster.

LEVELCORE READING TIME≈ 24 MIN BUILDS ONQUANT 01–03 INSTRUMENTSPRICER · ANTITHETIC · 1/√N
5.1

Monte Carlo for pricing — the idea

Risk-neutral valuation (Quant 03) says an option's price today is the discounted expectation of its payoff under the risk-neutral measure \(\mathbb{Q}\): \(V_0 = e^{-rT}\,\mathbb{E}^{\mathbb{Q}}[\,\text{payoff}\,]\). For a European call on a single lognormal stock that expectation has a closed form — the Black–Scholes formula. But the moment the payoff depends on the whole path (an Asian average, a barrier that may knock out), or on many assets at once (a basket, a worst-of), the integral becomes high-dimensional and no formula survives. Monte Carlo replaces the integral with an average over simulated futures.

The justification is the law of large numbers: draw \(N\) independent payoff samples \(Y_1, \dots, Y_N\) with mean \(\mu = \mathbb{E}[Y]\), and their sample mean converges to \(\mu\). That sample mean, discounted, is our price estimate:

EQ Q5.1 — THE MONTE CARLO ESTIMATOR $$ \hat{V}_N \;=\; e^{-rT}\,\frac{1}{N}\sum_{i=1}^{N} \text{payoff}\big(S^{(i)}\big), \qquad \hat{V}_N \xrightarrow[N\to\infty]{\text{a.s.}} V_0 $$
Each \(S^{(i)}\) is one simulated future of the underlying under \(\mathbb{Q}\); \(\text{payoff}(\cdot)\) reads its value off that scenario. The estimator is unbiased — its expectation is exactly \(V_0\) for any \(N\) — so the only error is statistical noise that the central limit theorem makes precise. Crucially, the method does not care how complicated the payoff is, nor how many assets feed it: a worst-of-twenty basket costs the same per-path arithmetic as a vanilla call.

How wrong can \(\hat{V}_N\) be? The central limit theorem turns the spread of the samples into an error bar. With \(\sigma_Y\) the standard deviation of the (discounted) payoff, the estimator's own standard deviation — its standard error — is

EQ Q5.2 — STANDARD ERROR & THE 1/√N LAW $$ \mathrm{SE}\big(\hat{V}_N\big) \;=\; \frac{\sigma_Y}{\sqrt{N}}, \qquad \text{95\% CI} \;\approx\; \hat{V}_N \,\pm\, 1.96\,\frac{\hat\sigma_Y}{\sqrt{N}} $$
\(\hat\sigma_Y\) is the sample standard deviation of the payoffs — you estimate the error from the same run that estimates the price. The error falls as \(1/\sqrt{N}\), not \(1/N\): to halve it you need four times the paths; to add a decimal digit (10×) you need a hundred times the paths. This brutal scaling is the central fact of the chapter and the reason every other section exists — they are all ways to shrink \(\sigma_Y\) rather than grow \(N\).
Monte Carlo error scales as \(1/\sqrt{N}\). If you run 100× as many paths, by what factor does the standard error shrink?
\(\mathrm{SE}\propto N^{-1/2}\), so multiplying \(N\) by 100 multiplies the error by \(1/\sqrt{100} = 1/10\). The error shrinks by a factor of 10 — one extra correct digit costs a hundredfold more work.

Why bother, when grids and trees exist? Because their cost explodes with dimension. A finite-difference PDE solver or a binomial tree (Quant 02) is excellent for one or two underlyings but suffers the curse of dimensionality: work grows exponentially in the number of state variables. Monte Carlo's \(1/\sqrt{N}\) error is independent of dimension — the same hundred-thousand paths price a one-asset call and a fifty-asset basket. Above three or four dimensions, simulation is the only game in town.

INSTRUMENT Q5.1 — MONTE CARLO OPTION PRICEREUROPEAN CALL · EQ Q5.1–Q5.2 · LIVE
MC PRICE
STD ERROR
95% CI HALF-WIDTH
CLOSED FORM (BS)
Spot \(S_0=100\), rate \(r=5\%\), expiry \(T=1\)y are fixed. The grey band is the live 95% confidence interval around the running MC estimate; the blue line is the exact Black–Scholes price. Drag PATHS from 64 up to half a million and watch the band tighten toward the blue line as \(1/\sqrt{N}\) — quadrupling \(N\) only halves the band. The seed is fixed, so each \(N\) is a true refinement of the same path set, not a fresh roll.
5.2

Simulating payoffs under the risk-neutral measure

To average payoffs you must first generate scenarios — and they must be drawn under \(\mathbb{Q}\), where the underlying drifts at the riskless rate \(r\) rather than its real-world drift \(\mu\). For a stock following geometric Brownian motion (Quant 03), one terminal price needs exactly one Gaussian draw, because the exact solution of the SDE is known in closed form:

EQ Q5.3 — EXACT GBM SIMULATION (TERMINAL) $$ S_T \;=\; S_0 \exp\!\Big[\big(r - \tfrac{1}{2}\sigma^2\big)T \;+\; \sigma\sqrt{T}\,Z\Big], \qquad Z \sim \mathcal{N}(0,1) $$
The drift carries the Itô correction \(-\tfrac12\sigma^2\) so that \(\mathbb{E}^{\mathbb{Q}}[S_T] = S_0 e^{rT}\) exactly. For a European payoff you never simulate the path — only its endpoint, one normal draw per scenario. Because the GBM solution is exact, this introduces no discretization error; the only error is statistical (EQ Q5.2). When the payoff is path-dependent (§5.4), you instead step the SDE through time.

When you do need the whole path — for an Asian average or a barrier check — you discretize the SDE over a time grid \(0 = t_0 < t_1 < \cdots < t_m = T\). The log-Euler (exact-in-log) scheme steps the log-price with one independent Gaussian per step:

EQ Q5.4 — STEPPING THE PATH (LOG-EULER) $$ S_{t_{k+1}} \;=\; S_{t_k}\exp\!\Big[\big(r - \tfrac{1}{2}\sigma^2\big)\Delta t \;+\; \sigma\sqrt{\Delta t}\,Z_{k+1}\Big], \qquad Z_{k+1}\sim\mathcal{N}(0,1)\ \text{i.i.d.} $$
Stepping in \(\log S\) keeps the scheme exact for GBM at any step size \(\Delta t\); the price stays strictly positive. For SDEs without a closed-form solution (Heston, CIR), plain Euler–Maruyama introduces a discretization bias of order \(\Delta t\) that adds to the statistical error — so a path-dependent price has two errors to control: too few paths (variance) and too few steps (bias).

The whole recipe for a European price is then four lines: draw \(Z\), map to \(S_T\), apply the payoff, discount the mean. The first Python cell does exactly this and lays the result alongside the closed form so you can see the agreement — and the standard error that quantifies it.

PYTHON · RUNNABLE IN-BROWSER
# Monte-Carlo price a European call vs Black-Scholes, with a standard error
import numpy as np, math
rng = np.random.default_rng(0)

def N(x):  # standard normal CDF via the error function
    return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))
def bs_call(S, K, r, sig, T):
    d1 = (math.log(S/K) + (r + 0.5*sig*sig)*T) / (sig*math.sqrt(T))
    d2 = d1 - sig*math.sqrt(T)
    return S*N(d1) - K*math.exp(-r*T)*N(d2)

S0, K, r, sig, T = 100.0, 105.0, 0.05, 0.20, 1.0
M = 200_000
Z  = rng.standard_normal(M)
ST = S0 * np.exp((r - 0.5*sig*sig)*T + sig*math.sqrt(T)*Z)   # EQ Q5.3, risk-neutral
disc_payoff = math.exp(-r*T) * np.maximum(ST - K, 0.0)        # discounted payoffs

price = disc_payoff.mean()                                    # EQ Q5.1
se    = disc_payoff.std(ddof=1) / math.sqrt(M)                # EQ Q5.2
exact = bs_call(S0, K, r, sig, T)

print(f"Monte-Carlo call : {price:.4f}   +/- {1.96*se:.4f}  (95% CI)")
print(f"Black-Scholes    : {exact:.4f}")
print(f"gap / SE         : {(price-exact)/se:+.2f}  (should sit within ~2)")
print(f"exact lies in CI : {abs(price-exact) <= 1.96*se}")
edits are live — break it on purpose
INSTRUMENT Q5.2 — THE 1/√N CONVERGENCE LAWSE vs PATHS · LOG–LOG · EQ Q5.2
SLOPE (LOG–LOG)
−0.50
PATHS FOR TARGET SE
4× PATHS ⇒ ERROR ×
0.50
On log–log axes the standard error is a straight line of slope exactly \(-\tfrac12\) — that is the \(1/\sqrt{N}\) law made visible, and it never bends no matter how you set the payoff spread \(\sigma_Y\). Raising \(\sigma_Y\) lifts the whole line: a wilder payoff needs more paths for the same accuracy, which is precisely the lever variance reduction pulls. The "paths for target SE" readout is \(N = (\sigma_Y/\text{SE})^2\) — note it grows quadratically as you tighten the target.
5.3

Variance reduction — antithetic & control variates

Because the error is \(\sigma_Y/\sqrt{N}\), there are only two ways to make a Monte Carlo estimate more accurate: run more paths (linear cost, square-root payoff) or shrink \(\sigma_Y\) itself. The second is almost free and is what separates a textbook simulation from a production one. Two techniques dominate.

Antithetic variates

The Gaussian is symmetric: if \(Z\) is a valid draw, so is \(-Z\), with the same probability. So pair every path driven by \(Z\) with a mirror path driven by \(-Z\), and average the two payoffs into one sample. The pairs cost one extra (cheap) evaluation but reuse the same random number, and — for a payoff that moves monotonically with \(Z\) — the two halves are negatively correlated, which cancels noise:

EQ Q5.5 — ANTITHETIC PAIR VARIANCE $$ \hat{V}_{\text{anti}} = \frac{1}{N/2}\sum_{i=1}^{N/2}\frac{Y_i + \tilde{Y}_i}{2}, \qquad \mathrm{Var}\big(\hat{V}_{\text{anti}}\big) = \frac{\sigma_Y^2}{N}\big(1 + \rho\big), \quad \rho = \mathrm{Corr}\big(Y,\tilde Y\big) $$
\(Y_i = \text{payoff}(Z_i)\) and \(\tilde Y_i = \text{payoff}(-Z_i)\) are the mirror pair. Compare the plain estimator's variance \(\sigma_Y^2/N\): the antithetic version multiplies it by \((1+\rho)\). Whenever \(\rho < 0\), variance drops — and for any payoff monotone in \(Z\) (a vanilla call, a put, a forward) the correlation is provably negative, so antithetics always help. The honest caveat: for a payoff that is not monotone in \(Z\) (e.g. a straddle, symmetric about the strike) the correlation can be positive and antithetics can increase variance — so it is a default, not a law.
For a European call, antithetic variates (pairing each \(Z\) with \(-Z\)) reduce the variance of the price estimate. True or false?
A call's payoff \(\max(S_T-K,0)\) is monotone increasing in the shock \(Z\), so \(Y=\text{payoff}(Z)\) and \(\tilde Y=\text{payoff}(-Z)\) are negatively correlated (\(\rho<0\)). By EQ Q5.5 the variance is \(\tfrac{\sigma_Y^2}{N}(1+\rho) < \tfrac{\sigma_Y^2}{N}\). Answer: true.

Control variates

If you can't reduce a payoff's spread, subtract off a correlated quantity whose expectation you already know. Let \(X\) be a control with known mean \(\mathbb{E}[X]\) (for an Asian option, the stock itself, or a geometric-average Asian which prices in closed form). Form a corrected estimator:

EQ Q5.6 — CONTROL VARIATE $$ Y_{\text{cv}} = Y - c\,\big(X - \mathbb{E}[X]\big), \qquad c^\star = \frac{\mathrm{Cov}(Y,X)}{\mathrm{Var}(X)} \;\Longrightarrow\; \mathrm{Var}(Y_{\text{cv}}) = \sigma_Y^2\,\big(1-\rho_{XY}^2\big) $$
Subtracting \(c(X-\mathbb{E}[X])\) leaves the mean unchanged (the correction has expectation zero) but removes the part of \(Y\) that \(X\) can explain. The optimal coefficient \(c^\star\) is exactly a regression slope, and the resulting variance is scaled by \(1-\rho_{XY}^2\). A control correlated 0.99 with the payoff cuts the variance ~50× (\(1-0.99^2\approx0.02\)) — the single most powerful trick in the chapter. The price you pay: \(c^\star\) is usually estimated from a pilot run, introducing a tiny bias that vanishes as \(N\to\infty\).

These compose. Production pricers stack antithetics, a strong control variate, and quasi-random (low-discrepancy Sobol) sequences, which replace pseudo-random points with a deliberately even sweep of the unit cube and can lift the convergence rate toward \(1/N\) in low effective dimension. The discipline is always the same: never grow \(N\) when you can shrink \(\sigma_Y\).

PYTHON · RUNNABLE IN-BROWSER
# Antithetic variates: measure the variance reduction vs plain Monte Carlo
import numpy as np, math
rng = np.random.default_rng(1)

S0, K, r, sig, T = 100.0, 105.0, 0.05, 0.20, 1.0
M = 100_000                                   # plain uses M draws; antithetic M/2 pairs
drift, vol, disc = (r - 0.5*sig*sig)*T, sig*math.sqrt(T), math.exp(-r*T)
def call_payoff(Z):
    return disc * np.maximum(S0*np.exp(drift + vol*Z) - K, 0.0)

# plain MC: M independent draws
Yp = call_payoff(rng.standard_normal(M))
price_plain, se_plain = Yp.mean(), Yp.std(ddof=1)/math.sqrt(M)

# antithetic: M/2 shocks, each paired with its mirror -Z, averaged into one sample
Zh = rng.standard_normal(M//2)
Ya = 0.5 * (call_payoff(Zh) + call_payoff(-Zh))   # M/2 antithetic samples
price_anti, se_anti = Ya.mean(), Ya.std(ddof=1)/math.sqrt(M//2)

rho = np.corrcoef(call_payoff(Zh), call_payoff(-Zh))[0, 1]
print(f"plain MC     : {price_plain:.4f}  SE {se_plain:.4f}")
print(f"antithetic   : {price_anti:.4f}  SE {se_anti:.4f}")
print(f"mirror corr  : {rho:+.3f}   (negative -> variance falls)")
print(f"variance cut : {(se_plain/se_anti)**2:.2f}x   for the same {M:,} evaluations")
edits are live — break it on purpose
INSTRUMENT Q5.3 — PLAIN vs ANTITHETICSAME EVALUATIONS · EQ Q5.5 · 60 TRIALS
PLAIN — SPREAD (SD)
ANTITHETIC — SPREAD (SD)
VARIANCE REDUCTION
Each dot is one independent pricing trial of a \(K=100\) call, plotted by its estimate. The mint cloud (antithetic) and the blue cloud (plain) use the same number of payoff evaluations per trial, so this is a fair fight. The mint cloud hugs the true price far more tightly: that narrower scatter is the variance reduction, quantified at right. The call is monotone in the shock, so antithetics always win here — switch your mental model to a straddle and they would not.
5.4

Path-dependent options — Asian & barrier

Monte Carlo earns its keep where closed forms stop. Two workhorse exotics show why. Both depend not on \(S_T\) alone but on the trajectory the price took to get there — so you must simulate the whole path (EQ Q5.4), not just the endpoint.

An Asian option pays on the average price over a set of monitoring dates, not the final price. Averaging damps both the payoff's volatility and any last-minute manipulation, which is why Asians are popular in commodity and FX markets:

EQ Q5.7 — ARITHMETIC ASIAN CALL $$ \text{payoff} = \max\!\left( \bar{S} - K,\ 0 \right), \qquad \bar{S} = \frac{1}{m}\sum_{k=1}^{m} S_{t_k} $$
\(\bar S\) is the arithmetic mean over \(m\) monitoring dates along each simulated path. No closed form exists — a sum of lognormals is not lognormal — so this is a genuine Monte Carlo problem. The neat trick: the geometric-average Asian (product, not sum) does price in closed form, and it is ~0.99 correlated with the arithmetic one, making it the textbook control variate (EQ Q5.6) for this payoff.

A barrier option activates or extinguishes if the price touches a level \(B\) at any point. A down-and-out call, say, pays the usual call payoff unless the path ever falls to \(B\), in which case it is worthless:

EQ Q5.8 — DOWN-AND-OUT CALL $$ \text{payoff} = \max(S_T - K,\ 0)\,\cdot\,\mathbf{1}\!\left\{\min_{0\le t\le T} S_t \,>\, B\right\} $$
The indicator \(\mathbf{1}\{\cdot\}\) zeroes the payoff on any path whose running minimum breaches the barrier \(B\). Discrete monitoring introduces a bias: checking the barrier only at grid points misses intra-step crossings, so a coarse path systematically over-prices a knock-out. Refining the grid (\(m\to\infty\)) removes it, or a Brownian-bridge correction estimates the missed-crossing probability analytically between steps. This is the path-discretization bias of §5.2 made concrete — and a classic Monte Carlo trap.

The pattern generalizes: lookbacks (payoff on the running max/min), cliquets (sums of capped period returns), autocallables (early-redemption ladders), and worst-of baskets across many correlated underlyings are all priced by the same loop — simulate paths, apply the payoff functional, discount the mean. The payoff code changes; the engine does not. That uniformity is exactly why simulation became the lingua franca of the exotics desk.

5.5

Greeks via Monte Carlo

A price is only half the job — desks hedge with the Greeks (Quant 03), and those derivatives must come out of the same simulation. The naïve approach, finite differences (bump-and-revalue), reprices at \(S_0\) and \(S_0+h\) and takes the slope. It is universal but treacherous:

EQ Q5.9 — BUMP-AND-REVALUE DELTA $$ \hat\Delta \;=\; \frac{\hat V(S_0 + h) - \hat V(S_0 - h)}{2h} $$
A central difference of two Monte Carlo prices. The bias–variance trap: too large an \(h\) biases the estimate (you measure a secant, not the tangent); too small an \(h\) and the difference is swamped by Monte Carlo noise — the variance of the quotient blows up like \(1/h^2\). The one rule that rescues it: use common random numbers — the same seed for both legs — so the noise cancels in the difference rather than compounding.

Two cleaner families avoid the bump entirely. The pathwise (infinitesimal perturbation) estimator differentiates the payoff itself — for a call, \(\partial_{S_0}\max(S_T-K,0) = \mathbf{1}\{S_T>K\}\,S_T/S_0\) — giving an unbiased delta in a single pass, valid whenever the payoff is Lipschitz (it fails at the kink of a digital). The likelihood-ratio method instead differentiates the probability density, moving the derivative onto a smooth weight so it works even for discontinuous payoffs, at the cost of higher variance. Modern pricers increasingly use adjoint algorithmic differentiation (AAD), which computes all Greeks in one reverse pass at a cost independent of the number of parameters — the same trick that powers backpropagation in deep learning.

THE COMMON-SEED RULE

Reuse random numbers across every revaluation. Pricing the base and bumped scenarios on independent draws makes their difference the difference of two noisy numbers — the noise adds in quadrature and the Greek is garbage. Freeze the seed (common random numbers) and the bulk of the noise is identical in both legs and cancels in the subtraction. It is the single most common Monte Carlo Greeks bug, and the cheapest to fix.

NEXT

The same engine that prices an exotic also measures a portfolio's tail. Replace "discounted payoff" with "loss" and the average becomes an expected shortfall, the quantile becomes a Value-at-Risk. Quant 06 turns Monte Carlo loose on the whole book: VaR and ES, historical vs parametric vs simulated risk, backtesting, and why the rare-event tail is exactly where \(1/\sqrt{N}\) hurts most and importance sampling earns its keep.

5.R

References

  1. Boyle, P. (1977). Options: A Monte Carlo Approach. Journal of Financial Economics 4(3) — the paper that brought simulation to option pricing.
  2. Glasserman, P. (2003). Monte Carlo Methods in Financial Engineering. Springer — the definitive reference for variance reduction, path simulation, and Greeks.
  3. Boyle, P., Broadie, M. & Glasserman, P. (1997). Monte Carlo Methods for Security Pricing. Journal of Economic Dynamics and Control 21 — the canonical survey of MC techniques in finance.
  4. Longstaff, F. & Schwartz, E. (2001). Valuing American Options by Simulation: A Simple Least-Squares Approach. Review of Financial Studies 14(1) — least-squares Monte Carlo for early-exercise payoffs.
  5. Giles, M. & Glasserman, P. (2006). Smoking Adjoints: Fast Monte Carlo Greeks. RISK Magazine — adjoint algorithmic differentiation for computing all Greeks in one reverse pass.
  6. Kloeden, P. & Platen, E. (1992). Numerical Solution of Stochastic Differential Equations. Springer — Euler–Maruyama and higher-order path-discretization schemes.