Enhancing Fourier pricing with machine learning

Gero Junike, Hauke Stier · 2024

Read Enhancing Fourier pricing with machine learning by Gero Junike, Hauke Stier (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2412-05070.txt.

Introduction

Gero Junike and Hauke Stier blend machine learning with classic Fourier methods to price options. Their paper is from two thousand twenty-four. Fourier methods are fast and trusted, but they need tune values, such as a damping factor and a cut range. Picking those values by hand is slow and can be costly.

Past learning tools learned the price itself, which lost error control and forced fresh training for each new error aim. Junike and Stier learn the tune values instead. The Fourier method then does the pricing, with full error checks. Tests with the Heston model show fast runs that meet any set error aim with no retraining.

Catalog record

CREATORGero Junike, Hauke Stier
YEAR2024
COLLECTIONPAPERS
FORMATTXT
FILE SIZE38 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2412-05070

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Enhancing Fourier pricing with machine learning Gero Junike, Hauke Stier Abstract Fourier pricing methods such as the Carr-Madan formula or the COS method are classic tools for pricing European options for advanced models such as the Heston model. These methods require tuning parameters such as a damping factor, a truncation range, a number of terms, etc. Estimating these tuning parameters is difficult or computationally expensive. Recently, machine learning techniques have been proposed for fast pricing: they are able to learn the functional relationship between the parameters of the Heston model and the option price. However, machine learning techniques suffer from error control and require retraining for different error tolerances. In this research, we propose to learn the tuning parameters of the Fourier methods (instead of the prices) using machine learning techniques. As a result, we obtain very fast algorithms with full error control: Our approach works with any error tolerance without retraining, as demonstrated in numerical experiments using the Heston model. Keywords: Machine learning, computational finance, option pricing, Fourier pricing, error control, Heston model Mathematics Subject Classification: 65T40, 91G20, 91B24, 68T05 1 Introduction Fourier methods, such as the Carr-Madan formula and the COS method, see Carr and Madan 1999 and Fang and Oosterlee 2009 , are widely used to price European options. In order to speed up option pricing, Liu et al. 2019a ; Liu et al. 2019b , Yang et al. 2017 and Sirignano and Spiliopoulos 2018 propose a prediction of option prices using neural networks. Ruf and Wang 2020 provide a comprehensive review of neural networks for option pricing. Liu et al. 2019a ; Liu et al. 2019b use a parametric approach and consider an advanced stock price model, such as the Heston model, see Heston 1993 . They use a set of market parameters, including strike price and maturity, as well as model parameters, to predict the corresponding option prices. De Spiegeleer et al. 2018 use machine learning techniques based on Gaussian process regression for prediction of option prices. While De Spiegeleer et al. 2018 and Liu et al. 2019a ; Liu et al. 2019b were able to accelerate the existing Fourier methods to some extent, their approaches also exhibited certain limitations. Liu et al. 2019a ; Liu et al. 2019b obtain a mean absolute error (MAE) of about 10^{-4} . De Spiegeleer et al. 2018 also obtains a MAE of about 10^{-4} and a maximum absolute error of approximately 10^{-3} on their sample. De Spiegeleer et al. 2018 compare the numerical effort with the Carr-Madan formula and obtain an acceleration factor between 10 and 40 for European options. However, the approaches described in Liu et al. 2019a ; Liu et al. 2019b and De Spiegeleer et al. 2018 suffer from a lack of error control: To achieve higher numerical pricing accuracy, deeper neural networks are necessary and the machine learning methods need to be retrained with more samples, which is very time-consuming and impractical in most situations. In this paper, we propose an indirect use of machine learning methods to improve the accuracy and efficiency of existing pricing techniques with full error control. We focus on the COS method, but our approach is also applicable to other methods, i.e., we also discuss the Carr-Madan formula. We describe the main idea of the COS method, details can be found, e.g., in Fang and Oosterlee 2009 ; Oosterlee and Grzelak 2019 ; Junike and Pankrashkin 2022 : Given only the characteristic function of the log-returns of the underlying, the density of the log-returns is approximated in two steps: i) truncate the density on a finite interval [a,b] and ii) approximate the truncated density by a finite Fourier-cosine approximation with N terms. There is a clever trick to obtain the cosine-coefficients of the truncated density efficiently from the characteristic function. The CPU time of the COS method depends linearly on the number of terms N . Note that the choice of the truncation range has a significant influence on the number of terms required to achieve a certain accuracy. There are explicit formulas for the truncation range and the number of terms depending on an error tolerance \varepsilon>0 , see Junike and Pankrashkin 2022 and Junike 2024 . However, the truncation range formula requires evaluating higher-order derivatives of the characteristic function, which can be very time-consuming, e.g., in the case of the Heston model. The formula for the number of terms requires integration of the product of the characteristic function and a polynomial, which is also very time consuming. Fortunately, the time-consuming part required to obtain [a,b] and N does not depend on the required error tolerance \varepsilon . In this paper, we use machine learning techniques to learn the n -th derivatives of the characteristic function evaluated at zero and learn the integral of the characteristic function times a polynomial, which is independent of the required error tolerance. Then, we use these predicted values and the error tolerance to obtain the truncation range and the number of terms. The COS method can then be applied to price European options. Different traders may use different error tolerances, but our machine learning techniques do not require retraining. This error control is an advantage over direct prediction of option prices by machine learning techniques. The actual calculation of the option price using the COS method is then very fast. The paper is structured as follows. Section 2 gives an overview of the Heston model, which will be used in the numerical experiments. In Section 3 , we introduce the COS method and the Carr-Madan formula and machine learning techniques. Section 4 provides the numerical experiments to demonstrate the performance of the proposed method. Section 5 concludes the paper. 2 The Heston model Consider a financial market with a riskless bank-account and a stock with deterministic price S_{0}>0 today and random price S_{T} at some future date T>0 . In the Heston model with parameters \kappa>0 , \theta>0 , \xi>0 , \rho\in[-1,1] and v_{0}>0 , the stock price is described by the following system of differential equations \displaystyle\frac{dS_{t}}{S_{t}} \displaystyle= \displaystyle rdt+\sqrt{v_{t}}dW_{t},\,\,\,S_{0}\geq 0 (1) \displaystyle dv_{t} \displaystyle= \displaystyle\kappa(\theta-v_{t})dt+\xi\sqrt{v_{t}}dZ_{t}. (2) W and Z are correlated Brownian motions such that \text{cov}\left[dW_{t}dZ_{t}\right]=\rho dt , see Heston 1993 . The CIR process, described by Equation ( 2 ), stays positive if 2\kappa\theta\geq\xi^{2} , which is known as the Feller condition , see Andersen and Piterbarg 2007 . The characteristic function of the log stock price, see Bakshi et al. 1997 , is given by \displaystyle\varphi_{\log\left(S_{t}\right)}(u) \displaystyle= \displaystyle E\left[\exp(iu\log\left(S_{t}\right)\right] \displaystyle= \displaystyle\exp\left(iu\left(\log S_{0}+rt\right)\right) \displaystyle\times\exp(\theta\kappa\xi^{-2}\left(\left(\kappa-\rho\xi ui-d\right)t-2\log\left(\frac{1-ge^{-dt}}{1-g}\right)\right)) \displaystyle\times\exp\left(v_{0}\xi^{-2}\frac{\left(\kappa-\rho\xi iu-d\right)\left(1-e^{-dt}\right)}{1-ge^{-dt}}\right), where \displaystyle d \displaystyle= \displaystyle\left(\left(\rho\xi ui-\kappa\right)^{2}-\xi^{2}\left(-iu-u^{2}\right)\right)^{\frac{1}{2}}, \displaystyle g \displaystyle= \displaystyle\frac{\kappa-\rho\xi ui-d}{\kappa-\rho\xi ui+d}. 3 Algorithms: Numerical tools and machine learning 3.1 The Carr-Madan formula Carr and Madan 1999 showed that the price of a European call option with strike K and time to maturity T is given by e^{-\alpha\log(K)}e^{-rT}\frac{1}{\pi}\int_{0}^{\infty}\Re\left\{e^{-iv\log(K)}\frac{\varphi_{\log(S_{T})}\big(v-i(\alpha+1)\big)}{\alpha^{2}+\alpha-v^{2}+i(2\alpha+1)v}\right\}dv, (3) where \alpha>0 is a damping factor such that E[S_{T}^{1+\alpha}]<\infty and \varphi_{\log(S_{T})} is the characteristic function of \log(S_{T}) . \Re(z) denotes the real part of a complex number z and i=\sqrt{-1} is the complex unit. The integral in Eq. ( 3 ) can be truncated to (0,M) , for some M>0 , and then be evaluated using, e.g., Simpson’s rule with N grid points.

Read the complete text