Skip to content
All library documents

Longstaff–Schwartz for Multi-Exercise American Options

Article Quant Q&A · Author: Makina

Summary

The document considers adapting Longstaff–Schwartz Monte Carlo to a put that can be exercised at several discrete dates. It describes simulating geometric Brownian motion paths, estimating continuation values by regressing discounted future payoffs on a quadratic polynomial of the underlying price, and fitting the regression only to in-the-money paths. It also proposes applying the estimated exercise policy to a separate simulation to estimate value.

The question explores whether multiple exercise dates can be handled by recording exercise payoffs and discounting selected payoffs back to the start. However, it provides no answer validating that approach. The supplied code is for a standard single-exercise put, and its continuation estimate in the independent simulation is represented by an average payoff rather than evaluating the fitted state-dependent regression. The document therefore offers a useful statement of the modeling problem and an attempted workflow, but not a validated multi-exercise algorithm or reliable pricing result.

Key ideas

  • Longstaff–Schwartz estimates continuation value by regression on simulated paths.
  • The proposed regression uses a quadratic basis and only in-the-money paths.
  • A separate simulation can apply an exercise policy estimated on training paths.
  • A multi-exercise option requires a policy that accounts for the remaining exercise opportunities.
  • The provided code handles a single-exercise put and does not validate the proposed multi-exercise extension.

Tags

Full text
# Longstaff-Schwartz, special american option simulation using Python (numpy package)


# Longstaff-Schwartz, special american option simulation using Python (numpy package)












I got a put option, which can be exercised 3 times, all at different times, which are each month of a year $$t_1 = \frac{1}{12}, t_2 = \frac{2}{12} ... t_{12} = 1$$. Respectively, if exercised at $$t_n$$, the owner is paid $$\max(K - S_{t_n}, 0)$$

The underlying price follows standard geometric BM $$\frac{dS_t}{S_t} = (r - q)dt + \sigma dW_t$$

$S_0 = 100, K = 100, r = 0.06, q = 0.02, \sigma = 0.02, W_t$ - standard brownian motion

- I need to use quadratic polynomial basis function in the regression and only regress on the in the money paths.

- After I estimate the continuation values, I need to run an independent simulation in order to obtain a low-biased price.

So I started with the preparation for (creation of simulations) Longstaff-Schwartz.

```
import numpy as np

def blackscholes_mc(S, vol, r, q, ts, npaths):
    nsteps = len(ts) - 1
    ts = np.asfarray(ts)[:, np.newaxis]
    W = np.cumsum(np.vstack((np.zeros((1, npaths), dtype=np.float),
                             np.random.randn(nsteps, npaths) * np.sqrt(np.diff(ts, axis=0)))),
                  axis=0)
    paths = np.exp(-0.5*vol**2*ts + vol*W)*S*np.exp((r-q)*ts)
    return paths

S = 100
vol = 0.2
r = 0.06
q = 0.02
K = 100
T = 1

ts = np.linspace(0, 1, 13)
paths = blackscholes_mc(S, vol, r, q, ts=ts, npaths=10000)
```

Now, here comes the part where I'm basically wondering whether I'm going in the right direction. Because if I go wrong, I'll waste to much time.

The implementation of LS algorithm for a standard put option I came up with (just 1 exercise, the independent simulation + polynomial regression).

```
payoff = np.maximum(K-paths[-1], 0)
payoff_array = [0]
for i in range(len(ts)-2, 0, -1):
    discount = np.exp(-r*(ts[i+1]-ts[i]))
    payoff = payoff*discount
    p = np.polyfit(paths[i][K-paths[i] > 0], payoff[K-paths[i] > 0], deg=2)
    contval = np.polyval(p, paths[i])
    exerval = np.maximum(K-paths[i], 0)
    ind = exerval > contval
    payoff[ind] = exerval[ind]
    payoff_array.append(np.mean(payoff))

arr = payoff_array[::-1]

paths2 = blackscholes_mc(S, vol, r, q, ts=ts, npaths=100000)
payoff2 = np.maximum(K-paths2[-1], 0)
for i in range(len(ts)-2, 0, -1):
    discount = np.exp(-r*(ts[i+1]-ts[i]))
    payoff2 = payoff2*discount
    contval = arr[i]
    exerval = np.maximum(K-paths2[i], 0)
    ind = exerval > contval
    payoff2[ind] = exerval[ind]
np.mean(payoff2*np.exp(-r*(ts[1]-ts[0])))
```

This algorithm will find, for each path, the first moment when you exercise the option, take the payoff, discount it to the beginning and calculate the average of all paths' resulting payoff in the end. I regress only on the in the money paths, giving the [K-paths[i] > $0$] condition for the np.polyfit (that should suffice, right?). At each time point I save the payoff (the average of all path's payoffs, which are equal to the value of the created polynomial function at the stock price) into an array, which I construct inside the loop. I started it with zero just to have easier time working with it later. Then, I flip the array, create new, 100k simulation, where the only difference is that for my contval, which determines the policy (exercise or continue) I use the precalculated payoffs from previous simulation. As a result I end up doing the same thing as in the first simulation, i.e arrive going backwards to the start, find a stopping time (first exercise) for each path, discount each payoff to the present and, after taking average, return as a resulting payoff.

Now, for 3 exercises though, which can't happen during the same months, I have an idea to create an array for reach path, fill it up with the non-zero payoffs during the second simulation and then in the end take out 3 last values (i.e 3 first values, since this is backwards algorithm) and then discount them properly followed by summing them up. And then I'd do that for all paths and calculate the average. Would that be correct way to asses the value of such option or am I doing something wrong/misunderstanding?

I'd appreciate some input. Thank you in advance

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.