PDE Methods, Part 3: American Options & Trees vs Finite Differences#

The last page on PDE methods adds early exercise to the grid, and then shows how the two lattice-like methods of the series, trees and finite differences, are related. They look different, and they are close to the same calculation. This is the third of three pages on PDE methods.

Early exercise on a grid#

For an American option the value must never fall below the payoff \(g\). The pricing problem becomes a free boundary problem: in the region where early exercise is optimal, \(V = g\), and elsewhere \(V\) solves the PDE. The boundary between the two regions is not known in advance and is part of the solution. At each time step the grid must solve

\[\min\left( V - g, \;\; V - \text{(value from the PDE step)} \right) = 0\]

Three standard ways of doing this are:

  • Projection. Take the PDE step and then replace the value by the larger of itself and the payoff. It is simple, and it is only first order accurate in time.

  • Projected successive over-relaxation (PSOR). Solve the step by an iterative method that applies the constraint at each node as it goes.

  • Penalty method. Add a large penalty term for nodes where the value falls below the payoff, and iterate on which nodes are penalised. Each iteration is a tridiagonal solve. It is used in the example.

The result is the price and the exercise boundary, which is read from the nodes at which the constraint is active.

Trees and finite differences#

Write the explicit scheme of PDE Methods, Part 1: The Black-Scholes PDE & the Explicit Scheme as an average of three values:

\[V_j^{n+1} = p_d V_{j-1}^n + p_m V_j^n + p_u V_{j+1}^n\]

The weights \(p_u\), \(p_m\) and \(p_d\) are the probabilities of the trinomial tree of Lattice Methods, Part 2: Trinomial Trees & Early Exercise, when the grid has the tree’s step \(\Delta x = \lambda\sigma\sqrt{\Delta t}\). The one difference is the discounting. The tree discounts the average by \(e^{-r\Delta t}\). The finite difference scheme takes \(r\Delta t\) out of the middle weight, so that the weights add up to \(1 - r\Delta t\). The two differ by terms of order \(\Delta t^2\) at each step, and so by order \(\Delta t\) overall.

So the explicit scheme is a trinomial tree, with its discounting written slightly differently. This is useful in two ways. The stability condition of the explicit scheme, \(p_m \ge 0\), is the condition that the tree’s probabilities are positive. And a result about one transfers to the other: the oscillation of a binomial tree from the kink, the high accuracy of the trinomial one, and the need for smoothing are the same phenomenon seen from two sides.

The implicit and Crank-Nicolson schemes are not trees, since each node depends on all the others. They trade the interpretation as a probability for stability at any step.

Worked example#

The example prices the American put on the benchmark by the implicit scheme with a penalty, for finer and finer grids, against a 10,000-step binomial tree, finds the exercise boundary on the grid, and compares three methods.

Python code
"""American put by implicit finite differences with a penalty for the early exercise constraint, against trees."""
import numpy as np
from scipy.linalg import solve_banded

from binomial_example import crr
from common import K, R, S0, SIGMA, T, bs_price
from pde_implicit_example import operator
from trinomial_example import trinomial


def american_put(m, n, half_width=1.0, penalty=1e7, american=True, record=()):
    """Price at S0, and the exercise boundary at the times to expiry in `record` (years)."""
    dx, dt = 2 * half_width / m, T / n
    x = np.log(S0) + np.linspace(-half_width, half_width, m + 1)
    s = np.exp(x)
    g = np.maximum(K - s, 0)
    lower, diag, upper = operator(m, dx)
    base = np.zeros((3, m + 1))
    base[0, 1:] = -dt * upper[:-1]
    base[1] = 1 - dt * diag
    base[2, :-1] = -dt * lower[1:]
    base[1, 0] = base[1, -1] = 1.0
    base[0, 1] = base[2, -2] = 0.0
    v, boundary = g.copy(), {}
    wanted = {round(tau / dt): tau for tau in record}
    for step in range(1, n + 1):
        rhs = v.copy()
        rhs[0] = K * np.exp(-R * step * dt) - s[0] if not american else g[0]
        rhs[-1] = 0.0
        active = np.zeros(m + 1, dtype=bool)
        if american:
            active[1:-1] = v[1:-1] < g[1:-1]
        for _ in range(50):
            ab, r2 = base.copy(), rhs.copy()
            ab[1, active] += penalty
            r2[active] += penalty * g[active]
            w = solve_banded((1, 1), ab, r2)
            if not american:
                break
            new_active = np.zeros(m + 1, dtype=bool)
            new_active[1:-1] = w[1:-1] < g[1:-1]
            if (new_active == active).all():
                break
            active = new_active
        v = w
        if step in wanted:
            boundary[wanted[step]] = s[active].max() if active.any() else np.nan
    return v[m // 2], boundary


if __name__ == "__main__":
    reference = crr(10_000, call=False, american=True)
    print(f"American put, binomial tree with 10,000 steps: {reference:.5f}")
    print(f"European put: Black-Scholes {bs_price(call=False):.5f}, grid {american_put(400, 200, american=False)[0]:.5f}\n")

    print(f"{'Intervals':>10} {'Time steps':>11} {'PDE price':>10} {'Error':>10} {'Ratio':>7}")
    previous = None
    for m, n in ((100, 50), (200, 100), (400, 200), (800, 400), (1600, 800)):
        price, _ = american_put(m, n)
        err = price - reference
        print(f"{m:>10} {n:>11} {price:10.5f} {err:+10.5f} {'' if previous is None else f'{previous / err:7.2f}'}")
        previous = err

    times = (0.05, 0.25, 0.5, 0.75, 0.95)
    _, boundary = american_put(1600, 800, record=times)
    print("\nExercise boundary: stock price at or below which the put is exercised, by time to expiry")
    print(f"{'Years to expiry':>16} {'PDE grid':>9}")
    for tau in times:
        print(f"{tau:>16.2f} {boundary[tau]:9.3f}")

    print(f"\nSame put by three methods: binomial 1000 steps {crr(1000, call=False, american=True):.5f}, "
          f"trinomial 1000 steps {trinomial(1000, call=False, american=True):.5f}, PDE 800 time steps {american_put(1600, 800)[0]:.5f}")

The output is:

American put, binomial tree with 10,000 steps: 6.74290
European put: Black-Scholes 6.45796, grid 6.45240

 Intervals  Time steps  PDE price      Error   Ratio
       100          50    6.70450   -0.03840
       200         100    6.72589   -0.01701    2.26
       400         200    6.73489   -0.00801    2.12
       800         400    6.73902   -0.00388    2.06
      1600         800    6.74100   -0.00189    2.05

Exercise boundary: stock price at or below which the put is exercised, by time to expiry
 Years to expiry  PDE grid
            0.05    91.279
            0.25    84.789
            0.50    81.058
            0.75    78.761
            0.95    77.395

Same put by three methods: binomial 1000 steps 6.74204, trinomial 1000 steps 6.74286, PDE 800 time steps 6.74100

Reading the output:

  • The grid price converges to the tree price. The error falls from -0.038 to -0.0019 as the grid is refined, towards the 10,000-step tree value of 6.74290. The ratio of errors is about 2 when both the space and the time grid are halved, which is first order, because the implicit scheme and the penalty are first order in time.

  • The European check passes. The same grid without the exercise constraint gives 6.4524 for the European put against the Black-Scholes 6.4580, an error of -0.0056, of the size of the time error at that grid.

  • The boundary agrees with the tree. Five percent of a year before expiry the put is exercised below 91.3 on the grid, and 91.4 on the tree. At 0.95 years before expiry the figures are 77.4 and 77.2. The boundary is read to the spacing of the grid, which is 0.4 to 0.5 here.

  • Three methods, one price. The binomial tree gives 6.7420, the trinomial tree 6.7429 and the PDE 6.7410, all within 0.003 of one another and of the reference. They solve the same problem, so the differences are numerical errors, which is the information a control needs.

A valuation control view#

  • Use two methods on the same model: a tree and a PDE solver that give prices more than their combined numerical error apart point to a bug in one of them. This is a stronger test than convergence of a single method.

  • Check the constraint: the American value must be at or above the payoff and at or above the European value, everywhere on the grid. Violations of either show a failure of the constraint step.

  • Compare the exercise boundary: it is the part of the solution most sensitive to the method, and it is the quantity a trading desk uses to decide when to exercise a position.

  • Control the time-stepping error for early exercise: many American implementations are only first order in time, because of the projection or the penalty, even when the underlying scheme is second order. Document the rate and test it.

  • Know which scheme a library uses: and what its defaults are for the grid range, the number of steps, smoothing and the treatment of the exercise constraint. A default that works for a vanilla option can fail for a barrier or an option with a discrete dividend.

Next, Transform Methods, Part 1: Characteristic Functions moves to a different approach, which uses the characteristic function of the model.