# Finite difference methods with discontinuity in the payoff function

I have implemented a finite difference scheme for pricing options using a Black-Scholes-like model. I tested my implementation on a call option, and found that it gave extremely inaccurate results. I investigated intermediate values in my computations, and I suspect that my inaccurate results are caused by the discontinuity in the payoff function.

The payoff function:

$$\text{Payoff}(S) = \max(S-K, 0) \hspace{.4em} \text{for some strike price } K \text{.}$$

My scheme requires that I calculate $$\frac{\partial{U}}{\partial{S}}$$ and $$\frac{\partial^2{U}}{\partial{S}^2}$$ at two points near $$K$$. At these points, $$rs\frac{\partial{U}}{\partial{S}}$$ causes a minor issue, but $$\frac{1}{2}s^2v\frac{\partial^2{U}}{\partial{S}^2}$$ explodes when I use a first order central approximation.

What kinds of solutions exist for this problem? I'm trying to keep my derivative matrix $$A$$ (meaning $$U' = A U+x$$) "oblivious" to the type of derivative (or, in the case of a call option, the strike price) for simplicity of implementation. "Hack"-ish solutions are very welcome.

An example: I set the strike to K=110. Three nearby asset prices are 107.336, 109.983, and 112.732. If you compute first order central approximations at the point 109.983, you get

\begin{align} \frac{1}{2}s^2v\frac{\partial^2{U}}{\partial{S}^2} &= \frac{1}{2}(109.983^2)*v*\Big( 0.140*0 + (-0.274) * 0 + 0.134858*(112.732-110) \Big) \\ &=2,228.32*v \end{align}

At all other points, for the first time step, $$\frac{\partial^2{U}}{\partial{S}^2}=0$$.

• Part of the issue I'm having is that it seems to me that all discretizations should suffer from a discontinuity of the payoff function. I can't see why, then, this particular discontinuity should feel insurmountable without resorting to complex solutions like the projection method. Sep 14, 2021 at 19:03
• It's probably not related to this - but you should apply the log-transform to your PDE to move out of the S domain into the LogS domain. It simplifies your PDE by removing explicit dependence on S in the coefficients. That said, you can still price in the S space in PDE without it blowing up, so I suspect something else has gone awry! Can you post relevant segments of your code in the question? Sep 14, 2021 at 19:09
• @JamesSpencer-Lavan My code is a several-thousand-line implementation of this paper: arxiv.org/pdf/1111.4087.pdf. I have thoroughly, thoroughly tested to confirm that it conforms to the paper. I have added an example to the OP that can demonstrate what I am seeing. Sep 14, 2021 at 19:35
• @JamesSpencer-Lavan does translating the problem to the "LogS" domain improve accuracy of computations, or does it just simplify things? I'm seen the transformation in Shreve's Stochastic Calculus for Finance, but I'm having trouble finding it discussed in the context of finite difference methods. Sep 14, 2021 at 19:55
• Ok don't post thousands of lines of code. And yes LogS both simplifies the calculations and improves their accuracy, so it's worth looking at. You might have large 2nd derivatives at strike, at expiry, but you also discretise in time - so I'd expect taking a small dt will reduce the magnitude of this first step's contribution. Actually good point, if you are performing explicit Euler discretisation in spatial dimension, you need to be careful over the length of dt step. What is your dS and dt step sizes? Sep 14, 2021 at 21:17