Chapter 19 Numerical Methods
Almost every model in these notes was chosen for the same reason, and it was not realism. Affine dynamics give Riccati equations, Gaussian short rates give closed-form bonds, Heston gives a characteristic function, SABR gives an expansion — and each of those buys a price in microseconds, which is what made calibration possible on the hardware the models were designed for. That constraint shaped the canon, and it has largely lifted. This chapter is about what replaced it: what a lattice and a simulation actually cost, why early exercise is where the difficulty concentrates, and what becomes available once a model is no longer required to have a formula. We measure the costs rather than assert them, including two biases in the standard method for early exercise that pull in opposite directions and are usually discussed as one.
19.1 The Constraint That Chose the Models
| Model | What it was built to give in closed form |
|---|---|
| Vasicek, Hull-White (ch. 8) | Bond prices, and hence swaptions by |
| Jamshidian’s decomposition | |
| Affine models (ch. 14) | Bonds via Riccati equations |
| Heston (ch. 10) | A characteristic function, and prices by Fourier inversion |
| SABR (ch. 10) | An asymptotic expansion for implied volatility |
| Quasi-Gaussian (ch. 12) | A finite Markov state, so a low-dimensional grid |
None of these was selected because the world behaves that way. Each was selected because a calibration needs thousands of model prices, and a model that takes a second to price cannot be calibrated at all if a second is what one has for the whole exercise.
Remark (What the constraint cost).
The earlier chapters have already itemised the bill without presenting it as one. Chapter 10’s local volatility model fits every European price and predicts the wrong dynamics. Chapter 10’s SABR fits one expiry and is not consistent across expiries. Chapter 12’s quasi-Gaussian models buy a finite state by insisting the volatility structure decay exponentially, which nothing in the market requires. Chapter 18’s Gaussian copula is the extreme case: chosen because it is easy to simulate and calibrate, and structurally unable to represent the one quantity it was used for.
In each case a functional form was adopted because it was solvable, and the market then declined to agree. That is not an argument against the models — they are still what one reaches for, and most of this chapter’s alternatives are slower and less understood. It is an argument for knowing which of a model’s properties are markets and which are convenience.
Structure (Which constraint is binding now).
The models of chapter 5 through chapter 12 were selected under a constraint: a price had to be computable by hand, or by a machine far weaker than the one on any desk today. That constraint chose affine dynamics, exponential volatility structures and one-factor curves, and it chose them for tractability rather than for realism — which is what chapter 14 spends a chapter making precise.
That constraint has lifted. What has not lifted, and what this chapter argues is now the binding one, is identification. A model can be solved numerically at almost any complexity; it cannot be told apart from its neighbours by the instruments the market quotes. These notes have measured that three times over — SABR’s against its correlation, local-stochastic volatility’s mixing weight, and quasi-Gaussian’s mean reversion — and in each case the flatness was a property of the quoted instruments rather than of the optimiser. Compute stopped binding and data started.
So the question is not whether a solvable model is still necessary. It is not. The question is what solvability was providing besides speed, and the answer turns out to be two things: prices that are arbitrage-free for structural rather than statistical reasons, and errors one can bound in advance. The next section is about the first and §19.7 about the second.
19.2 Two Ways to Compute, and What Each Costs
Everything that is not a closed form is one of two things, and their weaknesses are complementary in a way that decides most practical choices.
Lattices and grids
Backward induction on a tree, or a finite difference solution of the pricing equation of chapter 5. Chapter 9’s forward equation can be run the other way for a whole strike surface at once.
The virtues are exactness and early exercise. There is no sampling error — refine the grid and the answer converges, at a rate that is second order in the spacing for a decent scheme — and early exercise is free, because backward induction already knows the continuation value when it needs to compare against intrinsic. That is why chapter 20’s model selection table sends callables to short rate models: not because those models are more realistic, but because their small state fits on a grid.
The vice is dimension. A tensor grid with points per axis in dimensions has points:
| points | points | ||
|---|---|---|---|
at a hundred points an axis. Three dimensions is comfortable, four is a project, and five is not happening. A basket over ten underlyings, or a market model with twenty forward rates, is not a large grid — it is no grid at all.
Simulation
Monte Carlo has exactly the opposite profile. Its error depends on the number of paths and not on the dimension, and it handles path dependence without any special effort because it has the path.
Calculation 19.1 (The rate, measured).
The standard error of a Monte Carlo estimate falls as . Pricing a one year European put in quant/src/numerics.rs:
| Paths | Standard error | Error |
|---|---|---|
The last column is flat across three decades, which is the rate confirmed rather than assumed.
The second half of that claim decides which method a problem gets. Doing it honestly needs an integral whose dimension can be varied while everything else is held still, so build one: drive a single lognormal with independent normals combined into one,
| (19.1) |
is standard normal for every , so a call on has the same Black-76 price at every , and its payoff has the same distribution — and therefore the same variance. Only the dimension of the integral changes. Anything that varies with is then a property of the method and not of the problem.
Calculation 19.2 (The dimension, measured).
A one year at-the-money call, , , worth at every dimension. Both methods are given the same budget of payoff evaluations: the grid spends it as nodes with as large as that allows, the simulation as paths.111numerics::DimensionTest.
| nodes an axis | grid error | simulation error | |
|---|---|---|---|
The grid is not merely better in one and two dimensions, it is in a different league — a deterministic rule converges in the mesh, not in the square root of a sample. By six dimensions it is wrong by three quarters of the price. The simulation column has no trend in it at all.
The middle rows wobble because moves in integer steps and the payoff’s kink lands between nodes differently each time; the collapse is the signal, not the ordering of against .
The cliff has a location and a reason. The grid gets nodes an axis out of a budget , so a budget spread over more axes leaves too few points on each to resolve anything: a hundred thousand evaluations is a hundred thousand nodes on one axis and five nodes on each of seven. Equivalently, to hold the mesh fixed the cost is , which is the table at the top of this section read as an error rather than as a point count.
The simulation’s flatness is exactly true here and only approximately true in practice. The standard error is , and the dimension appears nowhere in it. Measured across it is every time, to three figures. But (19.1) was built so that the payoff’s own standard deviation is the same at every dimension, and that is the part a real problem does not give you: a basket over ten assets, or a market model with twenty rates, generally has a payoff whose variance grows with the number of factors. Dimension independence is a statement about the exponent. The constant is still the payoff’s standard deviation, and that is a modelling quantity, not a numerical one.
Remark (What the rate means for a desk).
Four times the work to halve the error. A price good to a cent needs a hundred times the paths of one good to ten cents, and a Greek computed by bumping needs the difference of two such numbers, which is why Greeks are the expensive part of a simulation and why pathwise and adjoint methods exist.
Variance reduction — antithetics, control variates, importance sampling — improves the constant, sometimes by a large factor, and leaves the exponent alone. Quasi-Monte Carlo is the one technique that changes the rate, approaching when the effective dimension is low, which is a genuinely different proposition and worth reaching for when it applies.
Structure (Both methods are applying the same semigroup).
The two techniques look unrelated and are two ways of computing , the semigroup of chapter 3.
A lattice or a grid discretises the operator: replace by a matrix and by repeated multiplication. The error is a discretisation error, it is deterministic, and it shrinks with the mesh — and the matrix has one row per grid point, which is where the dimensional cost comes from.
A simulation samples the measure instead: draw from the law of and average . Nothing is discretised in the state, so nothing costs , and the error is a sampling error that shrinks with the square root of the count.
Written that way the trade is not a matter of taste. One method pays for accuracy in dimensions and the other in variance, and early exercise is hard for simulation for a structural reason: the exercise decision needs at an intermediate state, which is exactly the object a lattice computes and a simulation does not.
19.3 Arbitrage-Free Becomes a Property of the Estimator
A closed form has a property that is easy to overlook because it is never stated: its prices are mutually consistent by construction. Black-Scholes cannot produce a negative butterfly, because it is an expectation under a measure, and an expectation of a convex function of a random variable is convex. There is nothing to check.
Once the expectation is estimated rather than evaluated, that guarantee has to be earned, and it is not automatic.
Calculation 19.3 (A butterfly priced two ways).
Take three strikes with midway between and , and price each call by simulation. The payoff is convex in the strike, so for any single path
| (19.2) |
Price the three on a common set of paths and (19.2) is inherited term by term: the estimated butterfly is an average of non-negative numbers and cannot be negative. Ten thousand paths — far too few for an accurate price — give exactly zero violations across every width tried.222measured.
Price them on independent paths, which is what pricing each option separately amounts to, and nothing preserves it. Each price carries its own sampling error, the butterfly is a difference of nearly equal numbers, and at the same ten thousand paths over a quarter of narrow triples come out negative.333measured. The price set admits a static arbitrage: one could buy the butterfly for a negative amount.
Remark (Why more paths is the wrong answer).
The instinct is to spend more. It does not work: sampling error falls as while a butterfly’s true value falls as the square of the strike spacing, so for any path budget there is a spacing at which the violations return.444measured at two budgets and two widths. Sixteen times the paths buys four times the resolution in strike, and a desk quoting a surface always wants more resolution than that.
Note also which direction the failure hides in. Widening the butterfly makes its value large against the noise and the violations disappear, so a check on widely spaced strikes passes while the surface a desk actually shows — adjacent strikes, tightly spaced — fails. A validation that samples coarsely will not find this.
Structure (Three disciplines in place of one guarantee).
Calculation 19.3 generalises.
Arbitrage-freeness in a solvable model is a structural property: it follows from the price being an expectation under a measure. In a numerical model it is an estimator property, and it survives only if three things are done deliberately.
-
-
Price from a model, not from prices. A surface interpolated or learned directly from quotes has no measure behind it and no reason to be convex in strike or monotone in maturity. A simulation of an arbitrage-free process does, whatever else is wrong with it.
-
-
Share the randomness. Common random numbers across strikes, maturities and scenarios is what carries pathwise relations like (19.2) through to the estimates. The same discipline is what makes a bumped Greek meaningful, since a delta from two independent simulations is mostly noise.
-
-
Correct the discretisation. A discrete scheme does not preserve the martingale property exactly, so numeraire-relative assets drift. Chapter 8 measures the consequence: a Gaussian forward curve model simulated with the wrong drift stops repricing its own initial curve, by five basis points at a year and half a per cent at ten. The repair is to force the known quantities to reprice, which is what a control variate or a martingale correction does.
None of the three is expensive. All three are easy to omit, and each omission produces prices that look like prices.
19.4 Early Exercise, Where the Difficulty Concentrates
The two methods divide the world neatly except at one point, where most of the practical difficulty lives.
Early exercise needs the continuation value: at each exercise date, the holder compares what the option is worth if kept against what it pays if stopped. A lattice knows the continuation value exactly, because it has already solved the layer after. A simulation does not, because it runs forwards and the future of a path is not known when the decision is made — and using it anyway is not merely inaccurate, it is a different and much more valuable contract, one exercised with foresight.
The standard resolution is Longstaff and Schwartz’s: estimate the continuation value by regressing realised discounted cashflows on functions of the current state, across paths, and exercise where intrinsic beats the estimate. It works, it is what essentially every desk uses for Bermudans, and it is biased.
Remark (Two biases, not one).
They are usually discussed as though there were one, and they have different causes, different signs, and different remedies.
Foresight bias, upwards. If the same paths are used to fit the regression and to value the option, the exercise rule has seen the outcomes it is deciding about. It is fitted to the noise as well as to the signal, and a rule fitted to noise flatters itself on the data it was fitted to. This is a finite sample effect and it decays as paths are added.
Policy bias, downwards. The estimated rule is not the optimal stopping rule — a quadratic in the spot cannot be — and any suboptimal rule undervalues the option. This has nothing to do with sample size. It is the basis’s fault, and adding paths does not touch it.
The usual implementation contains both. Which one dominates depends on how many paths there are, and that is exactly what makes the situation confusing.