Numerical Methods for Derivatives Pricing#

A series on the numerical methods that turn a model into a price: random numbers and simulation, trees, finite differences, Fourier transforms, and the tools around them, linear algebra, root finding, differentiation, quadrature, interpolation, regression, optimisation and calibration. Every method solves the same benchmark option, so each can be checked against a closed form and against the others. It is written from a valuation control perspective, so each page ends with what to check.

The idea that runs through the series is a separation of three things: the model says how the underlying moves, the pricing problem says what is wanted, and the numerical method says how it is computed. The same problem solved by two methods isolates the numerical error from the model risk.

Questions this series answers:

How the series is organised#

The series has ten sections, each with its own index. The foundations come first: random numbers, the processes that models are made of, the discretisation of a stochastic differential equation, and the pricing problem with its benchmark. The methods follow in four families: Monte Carlo, lattices, partial differential equations and transforms. Four sections cover the tools that sit around every pricing engine. The supporting methods are linear algebra, root finding, numerical differentiation, the Jacobian and quadrature. Interpolation and extrapolation, which every curve and surface depends on, have a section of their own, followed by regression and fitting, and then optimisation and calibration, which draws on all of them. The advanced section covers early exercise by simulation, the curse of dimensionality, adjoint differentiation and machine learning. The last page compares all the methods on one table.

digraph series { rankdir=LR; node [shape=box, style=rounded, fontsize=10]; found [label="Foundations\nrandom numbers, processes,\nSDE discretisation"]; bench [label="Pricing problem\nand benchmark"]; mc [label="Monte Carlo"]; lat [label="Lattice"]; pde [label="PDE"]; tr [label="Transform"]; sup [label="Supporting:\nlinear algebra, roots,\ndifferentiation, quadrature"]; interp [label="Interpolation and\nextrapolation"]; reg [label="Regression\nand fitting"]; opt [label="Optimisation\nand calibration"]; adv [label="Advanced:\nLSM, dimension,\nadjoints"]; cmp [label="Comparison"]; found -> bench; bench -> mc; bench -> lat; bench -> pde; bench -> tr; bench -> sup; sup -> interp -> reg -> opt; mc -> adv; lat -> adv; pde -> adv; tr -> adv; opt -> adv; adv -> cmp; }

The code for every page is in the examples folder of the series. It uses NumPy and SciPy, every script runs on its own, and each one prints the output that is quoted on the page. The benchmark that they share is in The Pricing Problem & the Benchmark. The Bermudan swaption section, Interest Rate Mean Reversion, uses the grid and regression methods of this series for a rates product.