#### The problem of solving partial differential equations (PDEs) with moving boundaries naturally appears in various areas of science and technology. As applied to mathematical finance, one of these methods – the method of heat potentials (HP) – was actively utilized by A. Lipton and his co-authors to solve various mathematical finance problems, see (Lipton, 2001; Lipton and de Prado, 2020) and references therein. A complementary method of a generalized integral transform (GIT) is developed in (Carr and Itkin, 2021; Itkin and Muravey, 2020; Carr, Itkin, and Muravey, 2020) to price barrier and American options in the semi-closed form. An extension of the HP and GIT methods for the Bessel process is developed by (Carr, Itkin, and Muravey, 2020).

In the above mentioned papers it is shown that the new method is computationally more efficient than the existing ones, such as the backward and forward finite difference methods while providing better accuracy and stability. Also, the HP and GIT methods do not duplicate but rather complement each other. The former provides very accurate results for short maturities, and the latter for long maturities. This situation is well investigated for the heat equation with constant coefficients. There exist two representation of the solution:

- obtained by using the method of images
- by the Fourier series

Despite both solutions are equal as the infinite series, their convergence properties are different, (Lipton, 2002).

Even though many new problems have been solved in the above cited papers, there remain some other similar problems for one-factor financial models where direct application of those methods is not possible. For instance, this is the case for the Black-Karasinski model, popular among practitioners. Another problem is calibration of the local (or implied) volatility surface in various one-factor models. Almost all popular analytic and semi-analytical methods approach the solution of this problem by doing it term-by-term, which, doubtless, produces computational errors. For more details, see (Itkin, 2020) and references therein.

Therefore, in a recent paper of the authors, (Itkin, Lipton, and Muravey, 2021b) we attack this class of problems (some of them yet unsolved in the semi-analytical form) by using another method, which we call the method of multilayer heat equation. An alternative approach can be found in (Dias, 2015). However, his scheme does not apply to the case where there is a contact resistance between layers or the convective heat transfer at the end interfaces. Also, note that his algorithm as applied to the local volatility calibration problem is similar to the approach used in (Itkin and Lipton, 2018).

The main idea of the multilayer method is to split the whole (possibly infinite) domain in the space variable into a sequence of sub-domains.

At every sub-interval the corresponding parabolic operator could be either approximated by the operator with the space-homogeneous coefficients or, possibly, reduced to the heat equation by a series of transformations. After this is done, the multilayer method can be applied. Moreover, the method could be further extended to deal with non-linear volatility, drift, and killing term. Again, piecewise approximations of these terms lead to the parabolic equations at every sub-interval that could be transformed to the heat equation. Then, the application of the multilayer method solves the problem.

In our recent paper (Itkin, Lipton, and Muravey, 2021b), we combine the multilayer method with the HP and GIT methods. Since both provide a semi-analytical solution for sub-interval problems, combination of these solutions results in the entire solution expressed explicitly via one-dimensional integrals. At each layer, these integrals depend on either yet unknown potential density (in the HP method) or gradient of the solution at the layer’s boundaries (the GIT method). These unknown functions solve the interconnected systems of linear integral Volterra equations of the second kind, also derived in the paper. Once this solution is found (either numerically or, sometimes, analytically), the problem is solved. Note that one can transform the system of integral equations to linear equations on a time-space grid, which is lower banded (in our case, block lower triangular). Therefore, the corresponding system can be solved with complexity *O*(*M*^{2}*N*) where *N *is the number of layers, and *M *is the number of time steps, see (Itkin and Muravey, 2020) in more detail.

We also propose a particular construction of the layers’ internal boundaries, which allows representation of every integral in the Volterra equation as convolution. Applying the Laplace transform, we obtain a system of linear equations with a block-tridiagonal matrix (it contains four blocks). This system can be efficiently solved numerically (with complexity *O*(*N*)). In some cases, it can be solved analytically. After the solution is found, we use the Gaver-Stehfest method to compute the inverse Laplace transform, also with linear complexity in *N*.

We illustrate these novel ideas by representing several significant financial problems in the form suitable for solving them by the ML method. These problems include pricing barrier options in the time-dependent Black-Karasinski and modified Black-Karasinski (Verhulst) models, see (Itkin, Lipton, and Muravey, 2021a), as well as the solution of the Dupire equation. We also provide several numerical examples to demonstrate our method’s high speed and accuracy as compared with the standard finite-difference (FD) methods.

### About the authors

*Andrey Itkin, Tandon School of Engineering, New York University, New York, USA*

*Alexander Lipton, The Jerusalem School of Business Administration, The Hebrew University of Jerusalem, Jerusalem, Israel; Connection Science and Engineering, Massachusetts Institute of Technology, Cambridge, MA, USA*

*Dmitry Muravey, Moscow State University, Moscow, Russia*

### References

Carr, P. and A. Itkin (2021). “Semi-closed form solutions for barrier and American options written on a time-dependent Ornstein-Uhlenbeck process”. In: *Journal of Derivatives ***29**, 1, pp. 9–26.

Carr, P., A. Itkin, and D. Muravey (2020). “Semi-closed form prices of barrier options in the time-dependent CEV and CIR models”. In: *Journal of Derivatives ***28**, 1, pp. 26–50.

Dias, C.J. (2015). “A method of recursive images to solve transient heat diffusion in multilayer materials”.

In: *International Journal of Heat and Mass Transfer ***85**, pp. 1075–1083.

Itkin, A. (2020). *Fitting Local Volatility: Analytic and Numerical Approaches in Black-Scholes and Local Variance Gamma Models*. 11623. World Scientific Publishing Co. Pte. Ltd.

Itkin, A. and A. Lipton (2018). “Filling the gaps smoothly”. In: *Journal of Computational Sciences ***24**, pp. 195–208.

Itkin, A., A. Lipton, and D. Muravey (2021a). *Generalized Integral Transforms in Mathematical Finance*. Singapore: WSPC. ISBN: 978-981-123-173-5.

— (2021b). “Multilayer heat equations: application to finance”. In: *Frontiers of Mathematical Finance ***1**.

Itkin, A. and D. Muravey (2020). “Semi-closed form prices of barrier options in the Hull-White model”. In: *Risk ***Dec.**

Lipton, A. (2001). *Mathematical Methods For Foreign Exchange: A Financial Engineer’s Approach*. World

Scientific.

— (2002). “The vol smile problem”. In: *Risk*, pp. 61–65.

Lipton, A. and M.L. de Prado (2020). “A Closed-Form Solution for Optimal Mean-Reverting Trading Strategies”. In: *Risk*.