The Pricing Problem & the Benchmark#
The numerical methods in this series are tools for one job: to turn a model for how a price moves into a value for a product. This page separates the three parts of that job, sets out the benchmark option that every later page solves, and shows what the methods have in common.
Model, problem, method#
It helps to keep three things apart.
The model says how the underlying moves. For example, geometric Brownian motion \(dS_t = r S_t \, dt + \sigma S_t \, dW_t\) under the risk-neutral measure.
The pricing problem says what is wanted. For a payoff \(g(S_T)\) at time \(T\), it is the discounted expectation
\[V = E^Q\left[ e^{-rT} \, g(S_T) \right]\]The numerical method is how the expectation is computed. It can be a closed form, an average over simulated paths, a sum over a tree, the solution of a differential equation, an integral over a characteristic function, or a quadrature rule.
The model and the problem do not change with the method. The same expectation, solved five ways, must give the same number, and that is the strongest test that a numerical method has available. It is the idea behind this series: one option, five numerical methods, compared on accuracy, cost and the range of products each can handle.
The expectation and the PDE are two descriptions of one thing. The Feynman-Kac theorem says that the value \(V(S, t)\) of the expectation solves the partial differential equation
which is the Black-Scholes equation. A tree is a discrete version of the random walk, and a finite difference scheme is a discrete version of the equation. They look different and they are closely related, as PDE Methods, Part 3: American Options & Trees vs Finite Differences shows.
The benchmark option#
Every page uses the same option unless it says otherwise: a one-year European call and put on a stock that pays no dividend.
Input |
Value |
Note |
|---|---|---|
Spot \(S_0\) |
100 |
|
Strike \(K\) |
100 |
At the money |
Risk-free rate \(r\) |
3% |
Continuously compounded |
Volatility \(\sigma\) |
20% |
Constant |
Expiry \(T\) |
1 year |
For this option Black-Scholes gives the price in closed form, so every other method can be checked against it:
The delta is \(\Phi(d_1)\), the gamma is \(\varphi(d_1) / (S_0 \sigma \sqrt{T})\) and the vega is \(S_0 \varphi(d_1) \sqrt{T}\). Put-call parity, \(C - P = S_0 - K e^{-rT}\), holds for any model and any method, so it is a free check.
Worked example#
The code of the benchmark, which every other example imports, prices the call and the put, checks parity, and gives the three Greeks.
Python code
"""The benchmark option used on every page: a one-year at-the-money European call and put on a non-dividend stock."""
import numpy as np
from scipy.stats import norm
S0, K, R, SIGMA, T = 100.0, 100.0, 0.03, 0.20, 1.0
def bs_price(s=S0, k=K, r=R, sigma=SIGMA, t=T, call=True):
"""Black-Scholes price of a European option."""
sd = sigma * np.sqrt(t)
d1 = (np.log(s / k) + (r + 0.5 * sigma**2) * t) / sd
d2 = d1 - sd
if call:
return s * norm.cdf(d1) - k * np.exp(-r * t) * norm.cdf(d2)
return k * np.exp(-r * t) * norm.cdf(-d2) - s * norm.cdf(-d1)
def bs_greeks(s=S0, k=K, r=R, sigma=SIGMA, t=T):
"""Delta, gamma and vega of a call."""
sd = sigma * np.sqrt(t)
d1 = (np.log(s / k) + (r + 0.5 * sigma**2) * t) / sd
return norm.cdf(d1), norm.pdf(d1) / (s * sd), s * norm.pdf(d1) * np.sqrt(t)
if __name__ == "__main__":
call, put = bs_price(), bs_price(call=False)
delta, gamma, vega = bs_greeks()
print(f"S0 {S0}, K {K}, r {R:.0%}, sigma {SIGMA:.0%}, T {T}")
print(f"Call {call:.6f}, put {put:.6f}")
print(f"Put-call parity gap {call - put - (S0 - K * np.exp(-R * T)):.2e}")
print(f"Delta {delta:.6f}, gamma {gamma:.6f}, vega {vega:.4f}")
The output is:
S0 100.0, K 100.0, r 3%, sigma 20%, T 1.0
Call 9.413403, put 6.457957
Put-call parity gap 0.00e+00
Delta 0.598706, gamma 0.019333, vega 38.6668
The call is worth 9.4134 and the put 6.4580. The delta is 0.5987, a little above one half because the drift \(r\) lifts the forward above the strike. These numbers are the reference for the rest of the series.
What each method can and cannot do#
Method |
Strength |
Weakness |
Page |
|---|---|---|---|
Monte Carlo |
Path-dependent payoffs, many dimensions, any model that can be simulated |
Slow convergence, noise in Greeks, early exercise is hard |
|
Lattice |
Early exercise, simple to build and to audit |
Slow in more than two dimensions, oscillating error |
|
PDE |
Early exercise, smooth Greeks, barriers |
One to three dimensions only, boundary and grid choices |
PDE Methods, Part 1: The Black-Scholes PDE & the Explicit Scheme |
Transform |
Very fast for European options when the characteristic function is known |
European payoffs only, and the model must have the function |
|
Quadrature |
Exact for smooth low-dimensional integrals |
The cost grows exponentially with the dimension, kinks reduce accuracy |
The last page of the series, One Option, Five Numerical Methods, puts all of them on one table and one chart.
A valuation control view#
Test every numerical method against a benchmark that has a closed form: a simple option with a known price is the first test of any engine, before it is used on a product with no known answer.
Use put-call parity and other model-free identities as checks: they hold for every method, and a break shows a bug in the payoff, the discounting or the forward.
Separate model risk from numerical risk: a difference between two prices can come from different models, or from different numerical solutions of the same model. The first is a model reserve question and the second is a convergence question. Solving one model by two methods isolates the second. See Model Risk in Valuation.
Record the benchmark and its tolerances: an engine is approved against a set of tests with stated accuracy, and the tests are run again whenever the code or the library changes.
Next, Monte Carlo, Part 1: Basic Pricing starts with Monte Carlo.