Monte Carlo, Part 2: Path-Dependent Options#

A European option depends on the final price only, and a path-dependent option depends on what happened on the way. Monte Carlo handles these naturally, because it already has the paths, and this is where it earns its place over the other methods. This page prices an Asian option and a barrier option, and shows a bias that is easy to introduce: the difference between monitoring a barrier continuously and monitoring it at discrete dates.

Asian options#

An Asian call pays on the average of the price at fixing dates \(t_1, \dots, t_n\):

\[\text{payoff} = \max\left( \frac{1}{n}\sum_{j=1}^{n} S_{t_j} - K, \; 0 \right)\]

The average moves less than the price, so the option is cheaper than the European, and it is common in commodity and FX markets where a price is averaged over a month. The arithmetic average of lognormal variables has no closed-form distribution, so simulation is the usual method.

The geometric average does have a lognormal distribution, and its price is a closed form. It is a different option, rarely traded, but it is useful for two reasons: it is a check on the simulator, and it is a control variate for the arithmetic option (Monte Carlo, Part 3: Variance Reduction & Quasi-Monte Carlo). For \(n\) equally spaced fixings the logarithm of the geometric average is normal with

\[m = \ln S_0 + \left(r - \tfrac{1}{2}\sigma^2\right) T \frac{n+1}{2n}, \qquad v = \sigma^2 T \frac{(n+1)(2n+1)}{6n^2}\]

and the call is \(e^{-rT}\left[ e^{m + v/2}\Phi(d_1) - K\Phi(d_2) \right]\) with \(d_1 = (m + v - \ln K)/\sqrt{v}\) and \(d_2 = d_1 - \sqrt{v}\).

Barrier options#

A down-and-out call pays the call payoff unless the price falls to the barrier \(H\) at some point before expiry, in which case it is cancelled. It is worth less than the call, because some paths that would finish in the money are knocked out.

For a barrier monitored continuously, and \(H\) below the strike, there is a closed form. With \(\lambda = (r + \tfrac{1}{2}\sigma^2)/\sigma^2\) and \(y = \ln(H^2/(S_0 K))/(\sigma\sqrt{T}) + \lambda\sigma\sqrt{T}\), the down-and-in call is

\[C_{di} = S_0 (H/S_0)^{2\lambda} \Phi(y) - K e^{-rT} (H/S_0)^{2\lambda - 2} \Phi(y - \sigma\sqrt{T})\]

and the down-and-out call is \(C - C_{di}\).

A simulation checks the barrier at the simulated dates only. Between two dates the price may have crossed and come back, and the simulation does not see it. The simulated option is therefore more likely to survive than the continuous one, and its price is higher. This is the discrete monitoring bias. Many contracts do monitor at discrete dates, usually daily at the close, so the discrete price is the right one for them, and the continuous closed form is not.

Broadie, Glasserman and Kou showed that a discretely monitored barrier is well approximated by a continuous one that is shifted away from the price by \(e^{\beta\sigma\sqrt{\Delta t}}\), with \(\beta = 0.5826\), where \(\Delta t\) is the monitoring interval. For a down barrier \(H\) becomes \(H e^{-\beta\sigma\sqrt{\Delta t}}\).

Worked example#

The example prices a 12-fixing Asian call, with the geometric version as a check, and a down-and-out call with the barrier at 90, with monthly, weekly and daily monitoring, against the closed form and the shifted closed form.

Python code
"""Path-dependent options by Monte Carlo: an Asian call and a down-and-out barrier call, with closed-form checks."""
import numpy as np
from scipy.stats import norm

from common import K, R, S0, SIGMA, T, bs_price

H = 90.0  # down-and-out barrier
BETA = 0.5826  # Broadie-Glasserman-Kou constant for discrete monitoring


def paths(n, steps, rng, antithetic=False):
    """Stock paths on an equal grid, from exact lognormal steps. Returns n x steps, without the starting value."""
    dt = T / steps
    z = rng.standard_normal((n, steps))
    log_inc = (R - 0.5 * SIGMA**2) * dt + SIGMA * np.sqrt(dt) * z
    return S0 * np.exp(np.cumsum(log_inc, axis=1))


def geometric_asian_call(n_fix):
    """Closed form for a call on the geometric average of n_fix equally spaced fixings."""
    mean = np.log(S0) + (R - 0.5 * SIGMA**2) * T * (n_fix + 1) / (2 * n_fix)
    var = SIGMA**2 * T * (n_fix + 1) * (2 * n_fix + 1) / (6 * n_fix**2)
    sd = np.sqrt(var)
    d1 = (mean + var - np.log(K)) / sd
    return np.exp(-R * T) * (np.exp(mean + 0.5 * var) * norm.cdf(d1) - K * norm.cdf(d1 - sd))


def down_and_out_call(barrier):
    """Closed form for a continuously monitored down-and-out call with the barrier below the strike."""
    lam = (R + 0.5 * SIGMA**2) / SIGMA**2
    sd = SIGMA * np.sqrt(T)
    y = np.log(barrier**2 / (S0 * K)) / sd + lam * sd
    down_in = S0 * (barrier / S0) ** (2 * lam) * norm.cdf(y) - K * np.exp(-R * T) * (barrier / S0) ** (2 * lam - 2) * norm.cdf(y - sd)
    return bs_price() - down_in


def report(name, pv, reference=None):
    est, se = pv.mean(), pv.std(ddof=1) / np.sqrt(len(pv))
    tail = "" if reference is None else f"  reference {reference:.4f}, difference {est - reference:+.4f}"
    print(f"{name:<44} {est:8.4f} (se {se:.4f}){tail}")


if __name__ == "__main__":
    rng = np.random.default_rng(5)
    n, disc = 400_000, np.exp(-R * T)

    print("Asian call, 12 monthly fixings")
    s = paths(n, 12, rng)
    report("Geometric average, Monte Carlo", disc * np.maximum(np.exp(np.log(s).mean(axis=1)) - K, 0), geometric_asian_call(12))
    report("Arithmetic average, Monte Carlo", disc * np.maximum(s.mean(axis=1) - K, 0))
    print(f"{'European call, for comparison':<44} {bs_price():8.4f}")

    print(f"\nDown-and-out call, barrier {H:.0f}, strike {K:.0f}")
    print(f"{'Continuous monitoring, closed form':<44} {down_and_out_call(H):8.4f}")
    print(f"{'Monitoring':<44} {'Monte Carlo':>8}   {'Closed form, barrier shifted':>30}")
    for label, steps in (("Monthly (12)", 12), ("Weekly (52)", 52), ("Daily (252)", 252)):
        s = paths(n, steps, rng)
        alive = s.min(axis=1) > H
        pv = disc * np.maximum(s[:, -1] - K, 0) * alive
        shifted = down_and_out_call(H * np.exp(-BETA * SIGMA * np.sqrt(T / steps)))
        est, se = pv.mean(), pv.std(ddof=1) / np.sqrt(n)
        print(f"{label:<44} {est:8.4f} (se {se:.4f})   {shifted:8.4f}")

The output is:

Asian call, 12 monthly fixings
Geometric average, Monte Carlo                 5.4344 (se 0.0126)  reference 5.4353, difference -0.0010
Arithmetic average, Monte Carlo                5.6306 (se 0.0130)
European call, for comparison                  9.4134

Down-and-out call, barrier 90, strike 100
Continuous monitoring, closed form             7.7402
Monitoring                                   Monte Carlo   Closed form, barrier shifted
Monthly (12)                                   8.5528 (se 0.0223)     8.5900
Weekly (52)                                    8.2141 (se 0.0222)     8.2109
Daily (252)                                    8.0120 (se 0.0221)     7.9700

Reading the output:

  • The simulator passes its check. The geometric Asian call from simulation, 5.4344, is within 0.001 of the closed form, 5.4353, which is less than one standard error.

  • Averaging lowers the price. The arithmetic Asian call is 5.63 and the European call is 9.41. The arithmetic average is above the geometric one, 5.63 against 5.43, because the arithmetic mean of positive numbers is never below the geometric mean.

  • The barrier price depends on how often it is monitored. The continuous closed form is 7.74. Daily monitoring gives 8.01, weekly 8.21 and monthly 8.55. Monthly monitoring makes the option 0.81 more valuable than continuous monitoring, which is 10% of the price.

  • The shift of Broadie, Glasserman and Kou works well. The shifted closed form is 8.59, 8.21 and 7.97 against the simulated 8.55, 8.21 and 8.01. The differences are about 0.04 or less, which is within two standard errors. It is an approximation, and not exact.

A valuation control view#

  • Check the product terms that drive the price: the monitoring dates, the observation of the barrier (at close or intraday), the averaging dates and the treatment of a missed fixing. A mistake in one of these is a larger error than any numerical one.

  • Do not use a continuous closed form for a discrete contract: the price is wrong by the monitoring bias, which here is 10% at monthly monitoring. A simulator at the contract’s dates, or the shifted formula, should be the reference.

  • Use the exactly priced cousin as a test: the geometric Asian price tests the path generation, the fixing dates and the discounting before the arithmetic option is priced.

  • Barriers need extra care in risk and reserves: the price changes quickly near the barrier, so a small change in the barrier, the monitoring or the volatility changes the value. The reserve for barrier risk is a separate question from the price, and it depends on the smile as well as on the numerical method.

  • Check the number of time steps against the dates: a simulation that uses 50 equal steps for a daily-monitored barrier is not monitoring daily.

Next, Monte Carlo, Part 3: Variance Reduction & Quasi-Monte Carlo shows how to get a more accurate price from the same paths.