1. Introduction
A significant portion of the financial instruments traded today are derivatives, whose values are derived from the performance of underlying assets such as stocks, bonds, indices, commodities, and interest rates. Options are among the most actively traded financial derivatives. An option is a contract that grants its holder the right, but not the obligation, to buy or sell underlying assets (such as stocks) at a predetermined price (strike price), on or before a specified date (expiry). There are two main kinds of options: call options (which provide the right to buy) and put options (which provide the right to sell). Investors use options for leverage and to hedge against financial risks. However, pricing these instruments can be mathematically challenging.
Options trading has a long history, with standardized options first traded on the Chicago Board Options Exchange (CBOE) on April 26, 1973. The Black-Scholes model [
1], developed by Fischer Black and Myron Scholes in 1973, provided a groundbreaking closed-form solution for pricing European options. This work earned Black and Scholes the Nobel Prize in Economics in 1997 and laid the foundation for more complex option pricing models and associated numerical methods. Over the decades, advanced models incorporating realistic assumptions have been developed, though explicit solutions are often not feasible. Consequently, various numerical methods have emerged, including binomial and trinomial trees, Monte Carlo simulations and finite difference and finite element schemes for solving partial differential equations (PDEs).
[
2] applied Monte Carlo simulation to the field of financial derivatives, this works by simulating a large number of random paths of the underlying asset’s price to estimate the value of any financial derivative. [
3] refined the Monte Carlo method for option pricing, particularly focusing on variance reduction techniques to improve computational efficiency. [
4] gave a least-squares approach for valuing American Options by Monte-Carlo Simulations.
[
5] introduced the binomial tree method; a discrete-time model for option pricing approximates the Black-Scholes model’s continuous-time process. [
6] developed the trinomial tree model which offered better accuracy than the binomial model by incorporating an additional possible state at each node. [
7] extended the binomial model, typically applied to single-asset options, to multi-dimensional options.
Finite difference methods rely on discretizing a function on a grid. [
8] extended the application of finite difference methods for solving the Black-Scholes partial differential equation, providing improved accuracy and stability. [
9] proposed a fourth-order compact finite difference scheme to tackle a one-dimensional (1-D) nonlinear Black-Scholes equation, demonstrating unconditional stability. The application of the finite element method in option pricing by [
10] offered a robust method for solving option pricing PDEs, particularly useful for American options and exotic derivatives with complex boundaries.
Finite elements were used to price multi-asset American options by [
11]. [
12] provides a thorough explanation and comparison of numerical methods for pricing financial derivatives, including finite difference methods. [
13] presented a superconvergent fitted finite volume method for solving a degenerate nonlinear penalized Black-Scholes equation pertinent to European and American option pricing which was an improvement on conventional finite volume methods. [
14] suggested an advanced high-order finite difference method applicable to various option pricing models, encompassing the 1-D nonlinear Black-Scholes equation, Merton’s jump-diffusion model, and 2-D Heston’s stochastic volatility model. [
15] introduced a distinctive finite volume method tailored for solving the Black-Scholes model involving two underlying assets. [
16] proposed a radial basis function combined with the partition of unity method for solving American options with stochastic volatility. [
17] devised a radial basis function-generated finite difference (RBF-FD) method to solve a stochastic volatility jump model represented as a 2-D PIDE.
The formalization of Artificial Neural Networks originated by [
18] as a programming paradigm inspired by biology, enabling computers to learn from observable data. The introduction of the error backpropagation learning algorithm by [
19] greatly enhanced the appeal of neural networks (NNs) across diverse research fields. Today, NNs and deep learning are recognized as the most potent tools for addressing numerous challenges in image recognition, speech recognition, and natural language processing. They have also been applied to forecast and categorize economic and financial variables.
In the context of pricing financial derivatives, numerous studies have highlighted the benefits of employing neural networks (NNs) as a primary or supplementary tool. For example, [
20] advocated the utilization of learning networks to estimate the value of European options. They asserted that learning networks could reconstruct the Black–Scholes formula by utilizing a two-year training set comprising daily options prices. The resulting network, according to their findings, could then be applied to derive prices and effectively delta-hedge options in out-of-sample scenarios. In their 2000 study, [
21] derived a generalized option pricing formula with a structure akin to the Black–Scholes formula using a feed-forward neural network (NN) model. Their findings revealed minimal delta-hedging errors compared to the hedging effectiveness of the Black–Scholes model. [
22]’s study highlighted the transformative potential of deep learning in finance, demonstrating how advancements in technology and the accessibility of vast datasets have democratized the application of sophisticated neural network models for option pricing, marking a significant leap forward in the integration of artificial intelligence within the financial sector.
In the study by [
23], the researchers redefined the high-dimensional nonlinear Black–Scholes (BS) equation as a set of backward stochastic differential equations (BSDEs) and approximated the solution’s gradient using deep neural networks. They illustrated the effectiveness of their deep BSDE method through a demonstration of a 100-dimensional problem. In a recent work by [
24], the researchers suggested resolving the one-dimensional Black–Scholes (BS) equation to predict the value of European call options. They achieved this by employing a feed-forward neural network, specifically one with a single hidden layer. Additional sources discussing the utilization of neural networks in option pricing and hedging can be explored in a recent review article by [
25].
Physics-Informed Neural Networks (PINNs) have shown promising results in solving partial differential equations (PDEs) by incorporating domain knowledge into the training process. Option pricing often involves solving complex PDEs, such as the Black-Scholes equation or more advanced models. Recently [
26] used PINNs to price path-dependent options like American options. Also, PINNs have successfully been used to price two-dimensional European and American options by [
27] In this work we focus on the pricing of multi-asset ’Rainbow’ options (both American and European); such contracts enable investors to speculate on the relative performance of multiple underlying assets. Rainbow options have gained prominence due to their ability to capture correlations and interactions among various assets, making them a valuable tool for risk management. Rainbow options also play an important role in diversification and complex trading strategies.
The factors that determine the ease or difficulty of pricing multi-asset options include (1) the existence of a closed-form solution (they usually lack closed-form solution), (2) the number of underlying assets i.e. the dimensionality, (3) path dependency, (4) early exercise.
In the absence of closed-form solutions, numerical methods have to be used for multi-asset option pricing. Choosing a suitable numerical scheme involves a combination of speed, accuracy, simplicity, and generality.
The challenge is mainly that with many of the schemes, the computational efforts grow exponentially with the problem’s dimensions. Some rainbow option problems have closed-form solutions; like exchange options or options with no path dependency and are relatively easy to price. For three or less dimensions, finite difference methods (FDM) or finite element methods (FEM) are efficient. They cope well with early exercise and many path-dependent features can be incorporated, though usually at the cost of an extra dimension. A more recent method for pricing rainbow options is the collection method. These methods work particularly well for low-dimensional problems. However, for higher dimensions, they become unstable and cannot provide accurate results [
28]. For higher dimensions, Monte Carlo simulations are good. Unfortunately, they are not very efficient for American-style early exercise.
There is currently no numerical method that works very well with such a problem. As a result, the problem of efficiently pricing American rainbow option pricing for higher dimensions remains an interesting problem. This makes it a very interesting task to tackle with heuristic methods such as Physics Informed Neural Networks.
This paper is organized as follows. After the introduction and literature review in
Section 2, PINNs methodology is presented and the mathematical formulation of PINNs for option pricing PDEs is discussed in
Section 3. In
Section 4, we demonstrate the effectiveness and robustness of the proposed method for pricing options by comparing its results with existing methods. We benchmark the method by pricing a one-dimensional European option, a one-dimensional Asian option and two-dimensional cash-or-nothing option. In
Section 5, we use PINNs to calculate option prices for European and American-style rainbow options with four underlying assets and discuss the efficiency and accuracy of the method. In Section 6, we summarize our findings and discuss future work.
2. Methodology: Solving Option Pricing PDEs Using PINNs:
For a given differential equation:
in unknown function
y along with appropriate boundary and/or initial conditions, PINNs approximate the solution
, by using an ANN:
, which is completely described by a set of parameters (weights)
W. The loss function of the neural network is constructed by squaring the given differential equation, along with the squared boundary and initial conditions and the weights
W are adjusted such that
minimizes the loss function which is the same as saying that
solves (to some accuracy) the given PDE while satisfying the given conditions. Here
x represents the independent variables in the form of an n-tuple. After figuring out the domain of the independent variables, the points are randomly selected from that domain to act as inputs for our NN.
Vanilla or European Rainbow Option is a financial contract that gives the holder the right to buy/sell (call/put)
assets (
for prescribed strike (
S) at maturity
. Since it allows the holder to exercise at a fixed maturity date, its payoff depends upon the price of the underlying stock at expiry only and not the path of underlying. Therefore it is a path-independent option. For the European option with
number of underlying the associated PDE is:
where
is the value of the option, each
is the volatility of underlying stock
,
is the correlation coefficient between stock
i &
j ,
r is the interest rate, and
is the time to expiry (
T is the expiry,
is instantaneous time). Equation (
1) combined with payoff
determines the price of the option
American Rainbow option is a financial contract that gives the holder the right to buy/sell (call/put) assets ( for prescribed strike (S) at any time up to and including maturity . This early exercise feature makes the American option valuation problem a free boundary problem i.e. there exists an unknown boundary, that depends upon time. This boundary acts as the decision surface between early exercise and holding the option and it has to be determined as a part of the problem. So for American option valuation, we rewrite the Black Scholes PDE (used to solve European options) to a linear complementary form: which implicitly includes the free boundary condition into the PDE.
Multi-asset American option in the Linear Complementary Problem (LCP) approach forms a multi-dimensional partial differential complementary problem (PDCP) [
29];
However for this problem an analytical solution is not readily available. Since we want to convert black Scholes PDE into a Physics Informed Neural Network problem, first, we scale the input (stock) and adjust our PDE accordingly.
Scaling is done to improve convergence, speed and stability during training. It prevents features with large magnitudes from dominating the optimization process, ensuring fair contributions from all features; as pointed out by [
30]. For scaling we substitute:
and
These substitutions give us scaled PDE for the European Option:
To convert the above black Scholes pde for European option with multiple underlying into a Physics Informed Neural Network problem, first, we describe our pde in general form as
in the interior of domain
or any other Boundary condition, on the boundary of the domain
Similarly to convert
the American Option pricing problem to a
Physics Informed Neural Network problem, let’s describe our PDE in general form as
in the interior of domain
or any other boundary condition, on the boundary of the domain.
Here
and
are the differential operators on the domain and boundary respectively. In PINNs, the initial conditions are treated the same as the boundary conditions. We select (randomly) a collection of interior and boundary points
,
where each point is in an n-tuple of size
(for
d=number of stocks and extra one dimension to accommodate time ) The solution of any differential equation using PINNs involves minimizing a single loss function defined as weighted sum of the
norm of differential equation and boundry conditions:
where
and
are weights and
and
are the sets of input points.
Minimizing
means we are trying to find
i.e. a set of weights
W for which the PDE,
is zero or as close to zero as possible and the boundary conditions are also met, i.e.
solves the PDE.([
31])
Algorithm 1: PINN Algorithm for Solving Option Pricing Differential Equations |
Step 1: Construct a neural network with parameters W.
Step 2: Define two training sets, for the equation and for the boundary and initial conditions.
Step 3: Specify the loss function by summing the weighted norm of both the PDE equation and boundary/initial condition residuals.
Step 4: Train the neural network by minimizing the loss function to find the optimal parameters :
|
We use deepxde library of python for our work.
Algorithm 2: Usage of DeepXDE for Solving Option Pricing Differential Equations |
Step 1: Specify the computational domain using the geometry module.
Step 2: Define the PDE according to the option under consideration using TensorFlow’s syntax.
Step 3: Specify the boundary and initial/final conditions according to the nature of the option.
Step 4: Combine the geometry, PDE, and boundary/initial/final conditions into data.TimePDE
Step 5: Construct a neural network using the maps module.
Step 6: Define a Model by integrating the PDE problem from Step 4 and the neural network from Step 5.
Step 7: Call Model.compile to set the optimization hyperparameters, including the optimizer and learning rate.
Step 8: Call Model.train to train the network from random initialization
Step 9: Call Model.predict to obtain the PDE solution at various locations.
|
To check the efficiency of our models we calculate the mean square root of error (RMSE),
and
relative error of our model
against any preexisting solution method
and
is the mean of the observed values .
like in [
32]
3. Benchmarking
We now use the PINNs methodology to solve some well-understood problems. We will compare our results with those in the literature. We have trained our Neural Networks using T4GPU on Google Colab.
3.1. Bench marking with One-dimensional linear case:
First, we will consider solving the standard Black Scholes PDE equation for one underlying stock, obtained by putting
in equation(3):
The price of
the European put Option is obtained by solving the above BSPDE subject to these conditions:
where
L is some suitably large value obtained by truncating the original
domain to
. We take
. This is a rather simple problem that has an explicit solution. The exact solution of this BSPDE can be found in Ch7 [
28]
We solve this model for the following parameters:
These parameters are the same as the ones used in [
27].
We have two inputs (scaled stock price and time to expiry) and one output (scaled option price). We use a fully connected neural network with depth 4 (ie 3 hidden layers) and width 20 i.e. 20 neurons in each layer. For a fully connected feed forward neural network, the weights between two layers are equal to the number of neurons in the first layer multiplied by the number of neurons in the second layer, plus one bias weight per neuron in the second layer, which means our model has 921 weights.We utilize 2000*10 training residual points sampled within the spatio-temporal domain, 200*10 training points sampled on the boundary, and 100*10 residual points for the initial conditions. The activation function used is the hyperbolic tangent (tanh). The training begins with the Adam optimizer for 1000 iterations at a learning rate of 0.001, after which we switch to the L-BFGS optimizer. L-BFGS does not require a learning rate, and the neural network is trained until it converges. The number of training points, iterations, and the structure of the NN are decided upon careful consideration and trying different values until one with the best convergence and least L2 score is figured out.
The "Adam" optimizer had a train loss of 1.26e-03, and training took 4.4 seconds; The "L-BFGS" optimizer had a train loss of 2.50e-06 and training took 40.64 seconds. So both the optimizers together took the training time of 45.04 seconds
Figure 1 shows the test train loss history
Figure 2 shows the 3d plot of numerical solution over whole time domain
where
and
. For error comparison, first, we convert the output of our PINNs which is the scaled price (
), to option price (
) by using the relation:
In
Figure 2(b), we plot the numerical solution using PINNs against the exact solution calculated using formulas from [
29] at
. In
Figure 2(c), we plot the corresponding pointwise error (calculated as the predicted solution - exact solution), over the whole stock space
. In
Figure 2(d), we show the error histogram by taking 1000 random points from the domain
. Error is calculated using
The relative error is 0.0044 which is very small and quite acceptable.
3.2. Benching Marking with Two-Dimensional Put Option
In this section, we consider the two-asset option pricing problem, which is governed by the following PDE obtained by substituting
in equation(3)
where option value
depends upon prices of underlying asset
and time to maturity
. The payoff function for cash or nothing put option is:
where
is a fixed amount. For comparison we choose the same model parameters as by [
27]
The physical domain is truncated to a bound rectangle: and
Dirichlet boundary conditions
are imposed on
and
. On
, the boundary condition is chosen as the one-dimensional European binary put option on
, which is
where
and
is the cumulative distribution function. By the same argument, the boundary condition on
is given by
where
Here We have three inputs (price of stock one, price of stock two and time to expiry) and one output (cash or nothing put option price). We use a fully connected neural network with depth 6 (which means 5 hidden layers) and width 30. There are 3871 weights in this NN.
We utilize 2000*10 training residual points sampled within the spatio-temporal domain, 200*10 training points sampled on the boundary, and 100*10 residual points for the initial conditions. The activation function used is the hyperbolic tangent (tanh). The training begins with the Adam optimizer for 2000 iterations at a learning rate of 0.001, after which we switch to the L-BFGS optimizer. L-BFGS does not require a learning rate, and the neural network is trained until it converges.
The "Adam" optimizer had a train loss of 1.47e-02 , and training took 22.98 seconds; The "L-BFGS" optimizer had a train loss of 1.56e-03 and training took 73.83 seconds. So both the optimizers together took the training time of 96.81 seconds
Figure 3b shows the test train loss history
The obtained numerical solution plot is shown in
Figure 3a. It shows the 3d plot of the numerical solution at final time T or time to expiry zero, the x-axis and y-axis in the plot represent the two underlying stocks. Our results match those presented in , [
27]
3.3. Bench Marking with One-Dimensional Path-Dependent Option
Pricing Asian average rate call Options we introduce a new variable
and solve the system of PDEs
and
subject to the terminal condition of option price:
and initial condition of average
boundary conditions for this average rate call options are:
where
L is some suitably large value by truncating the original
domain to
. We take
.
A singularity exists in the equation for
A at
(i.e., today). However, at
the term
also goes to zero leaving us with a BSPDE for the European option which has an exact solution. so we leave out t=0 and take our time domain as
or
([
33])
We solve this model problem with parameters:
Note that for an Asian option, we use the actual time instead of introducing because t appears explicitly in this pde. We have two inputs (scaled stock price and time to expiry) and two outputs (average price, and option price). We use a fully connected neural network with depth 4 (ie 3 hidden layers) and width 20. Thus there are 942 weights. We utilize 2000*10 training residual points sampled within the spatio-temporal domain, 200*10 training points sampled on the boundary, and 100*10 residual points for the initial conditions. The activation function used is the hyperbolic tangent (tanh). The training begins with the Adam optimizer for 2000 iterations at a learning rate of 0.001, after which we switch to the L-BFGS optimizer. L-BFGS does not require a learning rate, and the neural network is trained until it converges.
The "Adam" optimizer had a train loss of 2.94e-01, and training took 13.90 seconds; The "L-BFGS" optimizer had a train loss of 2.76e-01 and training took 4.64 seconds. So both the optimizers together took training time of 18.54 seconds
For error comparison we randomly generated 1000 data points from the input domain of our NN i.e.
. The first coordinate of the out point represents the initial value of stock
and the other represents a time to expiry(t). Then we calculated the option value
for those points using the Monte Carlo method with 100000 paths and 256 time steps. We also calculate the values our model predicts
for each point. The relative error is calculated using the formula:
Figure 4.
Plots related to 0ne-underlying Asian option.
Figure 4.
Plots related to 0ne-underlying Asian option.
We plot an error histogram, to evaluate our results [
22]. The root-mean-squared error (RMSE) is 0.0041, which may be compared to the fact that the strike prices are all normalized to
$1. Hence the average error is less than ±0.4% of the strike. The average percentage pricing error (error divided by option price) is 0.0220 i.e., almost 2%. The histogram of pricing errors is shown
Figure 5a. We see that the errors are sufficiently small. Further, we estimated a regression of the model values and obtained R2 = 0.9981, i.e. almost 99.8% which is quite acceptable.
5. Conclusion
In this study we considered the pricing of rainbow options (options with multiple underlying assets) using PINNs. We give an overview of the methodology and a literature review in the introduction section. This is followed by benchmarking the method by applying it to some well studied problems. We then apply the method to pricing of rainbow options and discuss our findings.
In
Section 3 the method is used to price European and American type options with two underlying stocks and Asian options which are strongly path dependent. This is done as a benchmarking exercise as efficient numerical methods exist for these problems. We compare our results to those obtained by traditional numerical schemes and note that PINNs demonstrates strong performance across various scenarios.
We next apply PINNs to the pricing of multi-asset options. Pricing of these instruments pose significant computational challenges, including ’the curse of dimensionality’. We consider European and American options with four underlying stocks and note that PINNs is an efficient method for pricing these instruments.
In summary, leveraging AI and neural networks, which are rapidly evolving fields, in option pricing not only showcases current effectiveness but also opens avenues for leveraging future advancements in AI and PINNs. Once the network is trained, the option pricing process becomes significantly faster than existing algorithms. Moreover, we observed substantial improvements in time efficiency, especially when generating values across multiple stocks and time intervals for the same option.
As future work we would like to apply the methodology to more complex methods and numerically challenging option price models, involving stochastic volatility and transaction cost.