Skip to content
All library documents

Sawtooth Payoff Boundary Errors in Black-Scholes Simulations

Article Quant Q&A · Author: ThePlowKing

Summary

The note investigates why an implicit finite-difference solution of the Black-Scholes PDE and a Monte Carlo estimate produce different plots for a sawtooth-shaped terminal payoff. The response focuses on behavior near zero spot: the payoff should approach negative one there, but direct evaluation at exactly zero may return an invalid or unintended value. A boundary error can then affect nearby numerical values and create oscillations.

The question reports matching parameters and substantial spatial and time grids, along with a large number of Monte Carlo paths, but the answer does not reproduce the programs or establish which implementation is faulty. Its diagnosis is based on the observed ripples and should be checked against the payoff definition and the handling of the zero boundary in each method. The stated upper boundary condition is acknowledged by the questioner as unsuitable in general, limiting the example’s broader applicability.

Key ideas

  • The sawtooth payoff should approach negative one as spot approaches zero.
  • Evaluating the payoff exactly at zero may produce a nonsensical value in a numerical implementation.
  • A boundary error can influence nearby grid values and appear as oscillations.
  • The diagnosis is a plausible explanation based on the plot, not a reproduced verification of the code.
  • The upper boundary assumption limits the generality of the numerical comparison.

Tags

Full text
# Can someone check this boundary condition for me?


# Can someone check this boundary condition for me?












At the moment I'm comparing plots between the implicit numerical Black-Scholes PDE and the Monte-Carlo Method for the Black-Scholes equation. However, for the particular boundary condition I'm using I'm having a bit of difficulty finding the error in the code, so I thought I should post it here.

I'm currently using an initial condition for the 'option' at time $T$ maturity to be $-\frac{2}{\pi}\tan^{-1}\left(\frac{1}{ \tan((S_{t}\pi) / 2)}\right)$ where $S_{T}$ is the spot price. (This equation is for the sawtooth wave as given here: https://en.wikipedia.org/wiki/Sawtooth_wave)

In addition, the other boundary condition as $S_{t} \rightarrow \infty$ is $0$ (I know this is not a good boundary condition but it's enough for what I need). Anyway, the issue I'm having is that when I use the above initial condition in both the PDE and Monte Carlo programs they both generate different plots, which is an issue I don't have when when I use other trigonometric functions (such as $\sin(S_{t}/5) $etc.). The parameters are exactly the same, and I've taken it over a sufficiently large interval ($0$ to $400$), so I'm unsure what the problem could be. If it's not too much trouble, could someone try using these boundary conditions in their program to check how it should look?

EDIT: I forgot to include the parameters I had for the programs - I took Maturity time $T$ to be equal to $1$, interest rate equal to $0$, volatility equal to $0.25$ and spot price ranging from $0$ to $400$. The PDE is an implicit numerical scheme, and there are 1600 grid points in space and 2000 in time. The Monte-Carlo simulation was run 50000 at each grid point (the MC also has 1600 space grid points). In addition, the payoff is $-\frac{2}{\pi}\tan^{-1}\left(\frac{1}{ \tan((S_{t}\pi) / 2)}\right)$

I've attached a picture below of how the plots look:

Domain from 0 to 10:

Thanks in advance!

## Answer by werki (score 2, accepted)

https://quant.stackexchange.com/a/28264

Judging from the oscillations near $S=0$, it looks like the payoff function is causing these problems.

Your payoff should go towards -1 as $S$ goes towards zero, but your computer might just evaluate it at $S=0$, producing nonsense as a result. Depending on the exact implementation, this will then spread through the neighborhood of that point, causing these ripples.

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.