Deep backward stochastic differential equation method: Difference between revisions

Content deleted Content added
AzzurroLan (talk | contribs)
No edit summary
 
(123 intermediate revisions by 8 users not shown)
Line 1:
[[File:Deep BSDE Method.png|The neural network architecture of the Deep Backward Differential Equation method|thumb|upright=1.35]]
==Introduction==
'''Deep BSDE''' (Deep Backward Stochastic Differential Equation) is a numerical method that combines [[deep learning]] with [[Backward stochastic differential equation]] (BSDE). This method is particularly useful for solving high-dimensional problems in [[financial derivatives]] pricing and [[risk management]]. By leveraging the powerful function approximation capabilities of [[deep neural networks]], deep BSDE addresses the computational challenges faced by traditional numerical methods in high-dimensional settings <ref name="Han2018">{{cite journal | last1=Han | first1=J. | last2=Jentzen | first2=A. | last3=E | first3=W. | title=Solving high-dimensional partial differential equations using deep learning | journal=Proceedings of the National Academy of Sciences | volume=115 | issue=34 | pages=8505-8510 | year=2018 }}</ref>.
===Deep neural networks===
Deep Neural Network Methods encompass a class of machine learning techniques that have transformed numerous fields by enabling the modeling and interpretation of intricate data structures. These methods, often referred to as [[deep learning]], are distinguished by their hierarchical architecture comprising multiple layers of interconnected nodes, or neurons. This architecture allows deep neural networks to autonomously learn abstract representations of data, making them particularly effective in tasks such as [[image recognition]], [[natural language processing]], and [[financial modeling]]<ref>LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. *Nature, 521*(7553), 436-444.</ref>.
 
'''Deep backward stochastic differential equation method''' is a numerical method that combines [[deep learning]] with [[Backward stochastic differential equation]] (BSDE). This method is particularly useful for solving high-dimensional problems in [[financial derivatives]] pricing and [[risk management]]. By leveraging the powerful function approximation capabilities of [[deep neural networks]], deep BSDE addresses the computational challenges faced by traditional numerical methods in high-dimensional settings.<ref name="Han2018">{{cite journal | last1=Han | first1=J. | last2=Jentzen | first2=A. | last3=E | first3=W. | title=Solving high-dimensional partial differential equations using deep learning | journal=Proceedings of the National Academy of Sciences | volume=115 | issue=34 | pages=8505–8510 | year=2018 | doi=10.1073/pnas.1718942115 | doi-access=free | pmid=30082389 | pmc=6112690 }}</ref>
===Backward stochastic differential equation===
Backward Stochastic Differential Equations (BSDEs) represent a powerful mathematical tool extensively applied in fields such as [[stochastic control]], [[financial mathematics]], and beyond. Unlike traditional [[Stochastic differential equations ]](SDEs), which are solved forward in time, BSDEs are solved backward, starting from a future time and moving backwards to the present. This unique characteristic makes BSDEs particularly suitable for problems involving terminal conditions and uncertainties<ref name="Pardoux1990">{{cite journal | last1=Pardoux | first1=E. | last2=Peng | first2=S. | title=Adapted solution of a backward stochastic differential equation | journal=Systems & Control Letters | volume=14 | issue=1 | pages=55-61 | year=1990 }}</ref>.
 
==History==
===Backwards stochastic differential equations===
BSDEs were first introduced by Pardoux and Peng in 1990 <ref name="Pardoux1990">{{cite journal | last1=Pardoux | first1=E. | last2=Peng | first2=S. | title=Adapted solution of a backward stochastic differential equation | journal=Systems & Control Letters | volume=14 | issue=1 | pages=55-61 | year=1990 }}</ref> and have since become essential tools in [[stochastic control]] and [[financial mathematics]]. The combination of deep learning with BSDEs, known as deep BSDE, was proposed by Han, Jentzen, and E in 2018 as a solution to the high-dimensional challenges faced by traditional numerical methods<ref name="Han2018" />.
BSDEs were first introduced by Pardoux and Peng in 1990 and have since become essential tools in [[stochastic control]] and [[financial mathematics]]. In the 1990s, [[Étienne Pardoux]] and [[Shige Peng]] established the existence and uniqueness theory for BSDE solutions, applying BSDEs to financial mathematics and control theory. For instance, BSDEs have been widely used in option pricing, risk measurement, and dynamic hedging.<ref name="Pardoux1990">{{cite journal | last1=Pardoux | first1=E. | last2=Peng | first2=S. | title=Adapted solution of a backward stochastic differential equation | journal=Systems & Control Letters | volume=14 | issue=1 | pages=55–61 | year=1990 | doi=10.1016/0167-6911(90)90082-6 }}</ref>
===Deep learning===
[[File:35c3-9386-eng-deu-Introduction to Deep Learning webm-hd.webm|thumb|Introduction to Deep Learning|upright=1.35]]
[[Deep Learning]] is a [[machine learning]] method based on multilayer [[neural networks]]. Its core concept can be traced back to the neural computing models of the 1940s. In the 1980s, the proposal of the [[backpropagation]] algorithm made the training of multilayer neural networks possible. In 2006, the [[Deep Belief Networks]] proposed by [[Geoffrey Hinton]] and others rekindled interest in deep learning. Since then, deep learning has made groundbreaking advancements in [[image processing]], [[speech recognition]], [[natural language processing]], and other fields.<ref name="NatureBengio">{{cite journal |last1=LeCun |first1= Yann|last2=Bengio |first2=Yoshua | last3=Hinton | first3= Geoffrey|s2cid=3074096 |year=2015 |title=Deep Learning |journal=Nature |volume=521 |issue=7553 |pages=436–444 |doi=10.1038/nature14539 |pmid=26017442|bibcode=2015Natur.521..436L |url= https://hal.science/hal-04206682/file/Lecun2015.pdf}}</ref>
 
===Limitations of traditional numerical methods===
Traditional numerical methods for solving stochastic differential equations<ref name="kloeden">Kloeden, P.E., Platen E. (1992). Numerical Solution of Stochastic Differential Equations. Springer, Berlin, Heidelberg. DOI: https://doi.org/10.1007/978-3-662-12616-5</ref> include the [[Euler–Maruyama method]], [[Milstein method]], [[Runge–Kutta method (SDE)]] and methods based on different representations of iterated stochastic integrals.<ref name="Kuznetsov">Kuznetsov, D.F. (2023). Strong approximation of iterated Itô and Stratonovich stochastic integrals: Method of generalized multiple Fourier series. Application to numerical integration of Itô SDEs and semilinear SPDEs. Differ. Uravn. Protsesy Upr., no. 1. DOI: https://doi.org/10.21638/11701/spbu35.2023.110</ref><ref name="Rybakov">Rybakov, K.A. (2023). Spectral representations of iterated stochastic integrals and their application for modeling nonlinear stochastic dynamics. Mathematics, vol. 11, 4047. DOI: https://doi.org/10.3390/math11194047</ref>
 
But as financial problems become more complex, traditional numerical methods for BSDEs (such as the [[Monte Carlo method]], [[finite difference method]], etc.) have shown limitations such as high computational complexity and the curse of dimensionality.<ref name="Han2018">{{cite journal | last1=Han | first1=J. | last2=Jentzen | first2=A. | last3=E | first3=W. | title=Solving high-dimensional partial differential equations using deep learning | journal=Proceedings of the National Academy of Sciences | volume=115 | issue=34 | pages=8505–8510 | year=2018 | doi=10.1073/pnas.1718942115 | doi-access=free | pmid=30082389 | pmc=6112690 }}</ref>
#In high-dimensional scenarios, the Monte Carlo method requires numerous simulation paths to ensure accuracy, resulting in lengthy computation times. In particular, for nonlinear BSDEs, the convergence rate is slow, making it challenging to handle complex financial derivative pricing problems.<ref name="puc">{{cite web | title = Real Options with Monte Carlo Simulation | url = http://www.puc-rio.br/marco.ind/monte-carlo.html | access-date = 2010-09-24 | archive-url = https://web.archive.org/web/20100318060412/http://www.puc-rio.br/marco.ind/monte-carlo.html | archive-date = 2010-03-18 | url-status = dead }}</ref><ref>{{cite web | title = Monte Carlo Simulation | url = http://www.palisade.com/risk/monte_carlo_simulation.asp | publisher = Palisade Corporation | year = 2010 | access-date = 2010-09-24 }}</ref> [[File:Pi monte carlo all.gif|thumb|upright=1.35| Monte Carlo method applied to approximating the value of {{pi}}]]
#The finite difference method, on the other hand, experiences exponential growth in the number of computation grids with increasing dimensions, leading to significant computational and storage demands. This method is generally suitable for simple boundary conditions and low-dimensional BSDEs, but it is less effective in complex situations.<ref name="GrossmannRoos2007">{{cite book|author1=Christian Grossmann|author2=Hans-G. Roos| author3=Martin Stynes|title=Numerical Treatment of Partial Differential Equations| url=https://archive.org/details/numericaltreatme00gros_820|url-access=limited| year=2007| publisher=Springer Science & Business Media| isbn=978-3-540-71584-9|page=[https://archive.org/details/numericaltreatme00gros_820/page/n34 23]}}</ref>
 
===Deep BSDE method===
The combination of deep learning with BSDEs, known as deep BSDE, was proposed by Han, Jentzen, and E in 2018 as a solution to the high-dimensional challenges faced by traditional numerical methods. The Deep BSDE approach leverages the powerful nonlinear fitting capabilities of deep learning, approximating the solution of BSDEs by constructing neural networks. The specific idea is to represent the solution of a BSDE as the output of a neural network and train the network to approximate the solution.<ref name="Han2018" />
 
==Model==
===Mathematical Methodmethod===
Backward Stochastic Differential Equations (BSDEs) represent a powerful mathematical tool extensively applied in fields such as [[stochastic control]], [[financial mathematics]], and beyond. Unlike traditional [[Stochastic differential equations ]](SDEs), which are solved forward in time, BSDEs are solved backward, starting from a future time and moving backwards to the present. This unique characteristic makes BSDEs particularly suitable for problems involving terminal conditions and uncertainties.<ref name="Pardoux1990">{{cite journal | last1=Pardoux | first1=E. | last2=Peng | first2=S. | title=Adapted solution of a backward stochastic differential equation | journal=Systems & Control Letters | volume=14 | issue=1 | pages=55–61 | year=1990 | doi=10.1016/0167-6911(90)90082-6 }}</ref>
A standard BSDE can be expressed as:
 
{{differential equations}}
<math> Y_t = \xi + \int_t^T f(s, Y_s, Z_s) ds - \int_t^T Z_s dW_s </math>
 
A backward stochastic differential equation (BSDE) can be formulated as:<ref>{{Cite book|last1=Ma|first1=Jin|last2=Yong|first2=Jiongmin|date=2007|title=Forward-Backward Stochastic Differential Equations and their Applications|series=Lecture Notes in Mathematics |volume=1702 |url=https://link.springer.com/book/10.1007/978-3-540-48831-6|publisher=Springer Berlin, Heidelberg|doi=10.1007/978-3-540-48831-6 |isbn=978-3-540-65960-0 }}</ref>
where <math> Y_t </math> is the target variable, <math> \xi </math> is the terminal condition, <math> f </math> is the driver function, and <math> Z_t </math> is the process associated with the [[Brownian motion]] <math> W_t </math>. The deep BSDE method constructs neural networks to approximate the solutions for <math> Y </math> and <math> Z </math>, and utilizes [[stochastic gradient descent]] and other optimization algorithms for training<ref name="Han2018" />.
:<math> Y_t = \xi + \int_t^T f(s, Y_s, Z_s) \, ds - \int_t^T Z_s \, dW_s, \quad t \in [0, T] </math>
 
In this equation:
===Neural Network Architecture===
* <math> \xi </math> is the terminal condition specified at time <math> T </math>.
The core of this method lies in designing an appropriate neural network structure (such as [[fully connected network|fully connected networks]] or [[recurrent neural networks]]) and selecting effective optimization algorithms. The primary steps of the deep BSDE algorithm are as follows:
* <math>f:[0,T]\times\mathbb{R}\times\mathbb{R}\to\mathbb{R}</math> is called the generator of the BSDE
# Initialize the parameters of the neural network.
*<math>(Y_t,Z_t)_{t\in[0,T]}</math> is the solution consists of stochastic processes <math>(Y_t)_{t\in[0,T]}</math> and <math>(Z_t)_{t\in[0,T]}</math> which are adapted to the filtration <math>(\mathcal{F}_t)_{t\in [0,T]}</math>
# Generate Brownian motion paths using Monte Carlo simulation.
# At each time step, calculate* <math> Y_tW_s </math> and <math> Z_t </math>is usinga thestandard neural[[Brownian networkmotion]].
 
# Compute the loss function based on the backward iterative formula of the BSDE.
The goal is to find adapted processes <math> Y_t </math> and <math> Z_t </math> that satisfy this equation. Traditional numerical methods struggle with BSDEs due to the curse of dimensionality, which makes computations in high-dimensional spaces extremely challenging.<ref name="Han2018">{{cite journal | last1=Han | first1=J. | last2=Jentzen | first2=A. | last3=E | first3=W. | title=Solving high-dimensional partial differential equations using deep learning | journal=Proceedings of the National Academy of Sciences | volume=115 | issue=34 | pages=8505–8510 | year=2018 | doi=10.1073/pnas.1718942115 | doi-access=free | pmid=30082389 | pmc=6112690 }}</ref>
# Optimize the neural network parameters using stochastic gradient descent until convergence<ref name="Han2018" /><ref name="Beck2019" />.
 
===Methodology overview===
Source:<ref name="Han2018">{{cite journal | last1=Han | first1=J. | last2=Jentzen | first2=A. | last3=E | first3=W. | title=Solving high-dimensional partial differential equations using deep learning | journal=Proceedings of the National Academy of Sciences | volume=115 | issue=34 | pages=8505–8510 | year=2018 | doi=10.1073/pnas.1718942115 | doi-access=free | pmid=30082389 | pmc=6112690 }}</ref>
 
====1. Semilinear parabolic PDEs====
We consider a general class of PDEs represented by
<math>
\frac{\partial u}{\partial t}(t,x) + \frac{1}{2} \text{Tr}\left(\sigma\sigma^T(t,x)\left(\text{Hess}_x u(t,x)\right)\right) + \nabla u(t,x) \cdot \mu(t,x) + f\left(t,x,u(t,x),\sigma^T(t,x)\nabla u(t,x)\right) = 0
</math>
 
In this equation:
* <math> u(T,x) = g(x) </math> is the terminal condition specified at time <math> T </math>.
* <math> t </math> and <math> x </math> represent the time and <math> d </math>-dimensional space variable, respectively.
* <math> \sigma </math> is a known vector-valued function, <math> \sigma^T </math> denotes the transpose associated to <math> \sigma </math>, and <math> \text{Hess}_x u </math> denotes the Hessian of function <math> u </math> with respect to <math> x </math>.
* <math> \mu </math> is a known vector-valued function, and <math> f </math> is a known nonlinear function.
====2. Stochastic process representation====
Let <math> \{W_t\}_{t \geq 0} </math> be a <math> d </math>-dimensional Brownian motion and <math> \{X_t\}_{t \geq 0} </math> be a <math> d </math>-dimensional stochastic process which satisfies
 
<math>
X_t = \xi + \int_0^t \mu(s, X_s) \, ds + \int_0^t \sigma(s, X_s) \, dW_s
</math>
 
====3. Backward stochastic differential equation (BSDE)====
Then the solution of the PDE satisfies the following BSDE:
 
<math>
u(t, X_t) - u(0, X_0)
</math>
 
:<math>= - \int_0^t f\left(s, X_s, u(s, X_s), \sigma^T(s, X_s)\nabla u(s, X_s)\right) \, ds + \int_0^t \nabla u(s, X_s) \cdot \sigma(s, X_s) \, dW_s
</math>
 
====4. Temporal discretization====
 
Discretize the time interval <math> [0, T] </math> into steps <math> 0 = t_0 < t_1 < \cdots < t_N = T </math>:
 
<math>
X_{t_{n+1}} - X_{t_n} \approx \mu(t_n, X_{t_n}) \Delta t_n + \sigma(t_n, X_{t_n}) \Delta W_n
</math>
 
<math>
u(t_n, X_{t_{n+1}}) - u(t_n, X_{t_n})
</math>
:<math>\approx - f\left(t_n, X_{t_n}, u(t_n, X_{t_n}), \sigma^T(t_n, X_{t_n}) \nabla u(t_n, X_{t_n})\right) \Delta t_n + \left[\nabla u(t_n, X_{t_n}) \sigma(t_n, X_{t_n})\right] \Delta W_n
</math>
 
where <math> \Delta t_n = t_{n+1} - t_n </math> and <math> \Delta W_n = W_{t_{n+1}} - W_n </math>.
 
====5. Neural network approximation====
 
Use a multilayer feedforward neural network to approximate:
 
<math>
\sigma^T(t_n, X_n) \nabla u(t_n, X_n) \approx (\sigma^T \nabla u)(t_n, X_n; \theta_n)
</math>
 
for <math> n = 1, \ldots, N </math>, where <math> \theta_n </math> are parameters of the neural network approximating <math> x \mapsto \sigma^T(t, x) \nabla u(t, x) </math> at <math> t = t_n </math>.
 
====6. Training the neural network====
 
Stack all sub-networks in the approximation step to form a deep neural network. Train the network using paths <math> \{X_{t_n}\}_{0 \leq n \leq N} </math> and <math> \{W_{t_n}\}_{0 \leq n \leq N} </math> as input data, minimizing the loss function:
 
<math>
l(\theta) = \mathbb{E} \left| g(X_{t_N}) - \hat{u}\left(\{X_{t_n}\}_{0 \leq n \leq N}, \{W_{t_n}\}_{0 \leq n \leq N}; \theta \right) \right|^2
</math>
 
where <math> \hat{u} </math> is the approximation of <math> u(t, X_t) </math>.
 
===Neural network architecture===
Source:<ref name="Han2018" />
{{Artificial intelligence|Approaches}}
Deep learning encompass a class of machine learning techniques that have transformed numerous fields by enabling the modeling and interpretation of intricate data structures. These methods, often referred to as [[deep learning]], are distinguished by their hierarchical architecture comprising multiple layers of interconnected nodes, or neurons. This architecture allows deep neural networks to autonomously learn abstract representations of data, making them particularly effective in tasks such as [[image recognition]], [[natural language processing]], and [[financial modeling]]. The core of this method lies in designing an appropriate neural network structure (such as [[fully connected network|fully connected networks]] or [[recurrent neural networks]]) and selecting effective optimization algorithms.<ref name="NatureBengio">{{cite journal |last1=LeCun |first1= Yann|last2=Bengio |first2=Yoshua | last3=Hinton | first3= Geoffrey|s2cid=3074096 |year=2015 |title=Deep Learning |journal=Nature |volume=521 |issue=7553 |pages=436–444 |doi=10.1038/nature14539 |pmid=26017442|bibcode=2015Natur.521..436L |url= https://hal.science/hal-04206682/file/Lecun2015.pdf}}</ref>
 
The choice of deep BSDE network architecture, the number of layers, and the number of neurons per layer are crucial hyperparameters that significantly impact the performance of the deep BSDE method. The deep BSDE method constructs neural networks to approximate the solutions for <math> Y </math> and <math> Z </math>, and utilizes [[stochastic gradient descent]] and other optimization algorithms for training.<ref name="Han2018" />
 
The fig illustrates the network architecture for the deep BSDE method. Note that <math> \nabla u(t_n, X_{t_n}) </math> denotes the variable approximated directly by subnetworks, and <math> u(t_n, X_{t_n}) </math> denotes the variable computed iteratively in the network. There are three types of connections in this network:<ref name="Han2018" />
 
i) <math> X_{t_n} \rightarrow h_1^n \rightarrow h_2^n \rightarrow \ldots \rightarrow h_H^n \rightarrow \nabla u(t_n, X_{t_n}) </math> is the multilayer feedforward neural network approximating the spatial gradients at time <math> t = t_n </math>. The weights <math> \theta_n </math> of this subnetwork are the parameters optimized.
 
ii) <math> (u(t_n, X_{t_n}), \nabla u(t_n, X_{t_n}), W_{t_n+1} - W_{t_n}) \rightarrow u(t_{n+1}, X_{t_{n+1}}) </math> is the forward iteration providing the final output of the network as an approximation of <math> u(t_N, X_{t_N}) </math>, characterized by Eqs. 5 and 6. There are no parameters optimized in this type of connection.
 
iii) <math> (X_{t_n}, W_{t_n+1} - W_{t_n}) \rightarrow X_{t_{n+1}} </math> is the shortcut connecting blocks at different times, characterized by Eqs. 4 and 6. There are also no parameters optimized in this type of connection.
 
==Algorithms==
[[File:Gradient descent Hamiltonian Monte Carlo comparison.gif|thumb|upright=0.9|Gradient descent vs Monte Carlo]]
 
===Adam optimizer===
This function implements the Adam<ref name="Adam2014">{{cite arXiv |eprint=1412.6980 |class=cs.LG |first1=Diederik |last1=Kingma |first2=Jimmy |last2=Ba |title=Adam: A Method for Stochastic Optimization |year=2014}}</ref> algorithm for minimizing the target function <math>\mathcal{G}(\theta)</math>.
 
'''Function:''' ADAM(<math>\alpha</math>, <math>\beta_1</math>, <math>\beta_2</math>, <math>\epsilon</math>, <math>\mathcal{G}(\theta)</math>, <math>\theta_0</math>) '''is'''
<math>m_0 := 0</math> ''// Initialize the first moment vector''
<math>v_0 := 0</math> ''// Initialize the second moment vector''
<math>t := 0</math> ''// Initialize timestep''
''// Step 1: Initialize parameters''
<math>\theta_t := \theta_0</math>
''// Step 2: Optimization loop''
'''while''' <math>\theta_t</math> has not converged '''do'''
<math>t := t + 1</math>
<math>g_t := \nabla_\theta \mathcal{G}_t(\theta_{t-1})</math> ''// Compute gradient of <math>\mathcal{G}</math> at timestep <math>t</math>''
<math>m_t := \beta_1 \cdot m_{t-1} + (1 - \beta_1) \cdot g_t</math> ''// Update biased first moment estimate''
<math>v_t := \beta_2 \cdot v_{t-1} + (1 - \beta_2) \cdot g_t^2</math> ''// Update biased second raw moment estimate''
<math>\widehat{m}_t := \frac{m_t}{(1 - \beta_1^t)}</math> ''// Compute bias-corrected first moment estimate''
<math>\widehat{v}_t := \frac{v_t}{(1 - \beta_2^t)}</math> ''// Compute bias-corrected second moment estimate''
<math>\theta_t := \theta_{t-1} - \frac{\alpha \cdot \widehat{m}_t}{(\sqrt{\widehat{v}_t} + \epsilon)}</math> ''// Update parameters''
'''return''' <math>\theta_t</math>
 
* With the ADAM algorithm described above, we now present the pseudocode corresponding to a multilayer feedforward neural network:
===Backpropagation algorithm===
This function implements the backpropagation algorithm for training a multi-layer feedforward neural network.
 
'''Function:''' BackPropagation(''set'' <math>D=\left\{(\mathbf{x}_k,\mathbf{y}_k)\right\}_{k=1}^{m}</math>) '''is'''
''// Step 1: Random initialization''
''// Step 2: Optimization loop''
'''repeat''' until termination condition is met:
'''for each''' <math>(\mathbf{x}_k,\mathbf{y}_k) \in D</math>:
<math>\hat{\mathbf{y}}_k := f(\beta_j - \theta_j)</math> ''// Compute output''
''// Compute gradients''
'''for each''' output neuron <math>j</math>:
<math>g_j := \hat{y}_{j}^{k} (1 - \hat{y}_{j}^{k}) (\hat{y}_{j}^{k} - y_{j}^{k})</math> ''// Gradient of output neuron''
'''for each''' hidden neuron <math>h</math>:
<math>e_h := b_h (1 - b_h) \sum_{j=1}^{\ell} w_{hj} g_{j}</math> ''// Gradient of hidden neuron''
''// Update weights''
'''for each''' weight <math>w_{hj}</math>:
<math>\Delta w_{hj} := \eta g_j b_h</math> ''// Update rule for weight''
'''for each''' weight <math>v_{ih}</math>:
<math>\Delta v_{ih} := \eta e_h x_i</math> ''// Update rule for weight''
''// Update parameters''
'''for each''' parameter <math>\theta_j</math>:
<math>\Delta \theta_j := -\eta g_j</math> ''// Update rule for parameter''
'''for each''' parameter <math>\gamma_{h}</math>:
<math>\Delta \gamma_{h} := -\eta e_h</math> ''// Update rule for parameter''
''// Step 3: Construct the trained multi-layer feedforward neural network''
'''return''' trained neural network
* Combining the ADAM algorithm and a multilayer feedforward neural network, we provide the following pseudocode for solving the optimal investment portfolio:
 
===Numerical solution for optimal investment portfolio===
Source:<ref name="Han2018" />
 
This function calculates the optimal investment portfolio using the specified parameters and stochastic processes.
 
'''function''' OptimalInvestment(<math>W_{t_{i+1}} - W_{t_i}</math>, <math>x</math>, <math>\theta=(X_{0}, H_{0}, \theta_{1}, \theta_{2}, \dots, \theta_{N-1})</math>) '''is'''
''// Step 1: Initialization''
'''for''' <math>k := 0</math> '''to''' maxstep '''do'''
<math>M_0^{k, m} := 0</math>, <math>X_0^{k, m} := X_0^k</math> ''// Parameter initialization''
'''for''' <math>i := 0</math> '''to''' <math>N-1</math> '''do'''
<math>H_{t_i}^{k, m} := \mathcal{NN}(M_{t_i}^{k, m}; \theta_i^k)</math> ''// Update feedforward neural network unit''
<math>M_{t_{i+1}}^{k, m} := M_{t_{i}}^{k, m} + \big((1 - \phi)(\mu_{t_{i}} - M_{t_{i}}^{k, m})\big)(t_{i+1} - t_{i}) + \sigma_{t_{i}}(W_{t_{i+1}} - W_{t_{i}})</math>
<math>X_{t_{i+1}}^{k, m} := X_{t_{i}}^{k, m} + \big[H_{t_{i}}^{k, m}(\phi (M_{t_{i}}^{k, m} - \mu_{t_{i}}) + \mu_{t_{i}})\big](t_{i+1} - t_{i}) + H_{t_{i}}^{k, m} (W_{t_{i+1}} - W_{t_{i}})</math>
''// Step 2: Compute loss function''
<math>\mathcal{L}(t) := \frac{1}{M} \sum_{m=1}^M \left| X_{t_N}^{k, m} - g(M_{t_N}^{k, m}) \right|^2</math>
''// Step 3: Update parameters using ADAM optimization''
<math>\theta^{k+1} := \operatorname{ADAM}(\theta^k, \nabla \mathcal{L}(t))</math>
<math>X_0^{k+1} := \operatorname{ADAM}(X_0^k, \nabla \mathcal{L}(t))</math>
''// Step 4: Return terminal state''
'''return''' <math>(M_{t_N}, X_{t_N})</math>
 
==Application==
[[File:Loss function.png|thumb|The dynamically changing loss function|upright=1.35]]
Deep BSDE is widely used in the fields of financial derivatives pricing, risk management, and asset allocation. It is particularly suitable for:
# High-Dimensional Option Pricing: Pricing complex derivatives like [[basket options]] and [[Asian options]], which involve multiple underlying assets<ref name="Han2018" />.
# Risk Measurement: Calculating risk measures such as [[Conditional Value-at-Risk]] (CVaR) and [[Expected Shortfall]] (ES)* <ref name="Beck2019">{{cite journal | last1=Beck | first1=C. | last2=E | first2=W. | last3=Jentzen | first3=A. | title=Machine learning approximation algorithms for high-dimensional fully nonlinear partial differential equations and second-order backward stochastic differential equations | journal=Journal of Nonlinear Science | volume=29 | issue=4 | pages=1563-1619 | year=2019 }}</ref>.
# Dynamic Asset Allocation: Determining optimal strategies for asset allocation over time in a stochastic environment<ref name="Beck2019" />.
 
* High-Dimensional Option Pricing: Pricing complex derivatives like [[basket options]] and [[Asian options]], which involve multiple underlying assets.<ref name="Han2018" /> Traditional methods such as finite difference methods and Monte Carlo simulations struggle with these high-dimensional problems due to the curse of dimensionality, where the computational cost increases exponentially with the number of dimensions. Deep BSDE methods utilize the function approximation capabilities of [[deep neural networks]] to manage this complexity and provide accurate pricing solutions. The deep BSDE approach is particularly beneficial in scenarios where traditional numerical methods fall short. For instance, in high-dimensional option pricing, methods like finite difference or Monte Carlo simulations face significant challenges due to the exponential increase in computational requirements with the number of dimensions. Deep BSDE methods overcome this by leveraging deep learning to approximate solutions to high-dimensional PDEs efficiently.<ref name="Han2018" />
==Example==
Consider the high-dimensional Black-Scholes equation for European option pricing. Traditional numerical methods face significant challenges due to the [[curse of dimensionality]]. Deep BSDE uses neural networks to approximate the solution, significantly improving both accuracy and computational efficiency<ref name="Han2018" />.
 
* Risk Measurement: Calculating risk measures such as [[Conditional Value-at-Risk]] (CVaR) and [[Expected shortfall]] (ES).<ref name="Beck2019">{{cite journal | last1=Beck | first1=C. | last2=E | first2=W. | last3=Jentzen | first3=A. | title=Machine learning approximation algorithms for high-dimensional fully nonlinear partial differential equations and second-order backward stochastic differential equations | journal=Journal of Nonlinear Science | volume=29 | issue=4 | pages=1563–1619 | year=2019 | doi=10.1007/s00332-018-9525-3 | arxiv=1709.05963 }}</ref> These risk measures are crucial for financial institutions to assess potential losses in their portfolios. Deep BSDE methods enable efficient computation of these risk metrics even in high-dimensional settings, thereby improving the accuracy and robustness of risk assessments. In risk management, deep BSDE methods enhance the computation of advanced risk measures like CVaR and ES, which are essential for capturing tail risk in portfolios. These measures provide a more comprehensive understanding of potential losses compared to simpler metrics like Value-at-Risk (VaR). The use of deep neural networks enables these computations to be feasible even in high-dimensional contexts, ensuring accurate and reliable risk assessments.<ref name="Beck2019">{{cite journal | last1=Beck | first1=C. | last2=E | first2=W. | last3=Jentzen | first3=A. | title=Machine learning approximation algorithms for high-dimensional fully nonlinear partial differential equations and second-order backward stochastic differential equations | journal=Journal of Nonlinear Science | volume=29 | issue=4 | pages=1563–1619 | year=2019 | doi=10.1007/s00332-018-9525-3 | arxiv=1709.05963 }}</ref>
==Advantages and Disadvantages==
 
* Dynamic Asset Allocation: Determining optimal strategies for asset allocation over time in a stochastic environment.<ref name="Beck2019" /> This involves creating investment strategies that adapt to changing market conditions and asset price dynamics. By modeling the stochastic behavior of asset returns and incorporating it into the allocation decisions, deep BSDE methods allow investors to dynamically adjust their portfolios, maximizing expected returns while managing risk effectively. For dynamic asset allocation, deep BSDE methods offer significant advantages by optimizing investment strategies in response to market changes. This dynamic approach is critical for managing portfolios in a stochastic financial environment, where asset prices are subject to random fluctuations. Deep BSDE methods provide a framework for developing and executing strategies that adapt to these fluctuations, leading to more resilient and effective asset management.<ref name="Beck2019" />
 
==Advantages and disadvantages==
===Advantages===
Sources:<ref name="Han2018" /><ref name="Beck2019" />
# High-Dimensional Capability: Compared to traditional numerical methods, deep BSDE performs exceptionally well in high-dimensional problems.
# High-dimensional capability: Compared to traditional numerical methods, deep BSDE performs exceptionally well in high-dimensional problems.
# Flexibility: The incorporation of deep neural networks allows this method to adapt to various types of BSDEs and financial models.
# Parallel Computingcomputing: Deep learning frameworks support GPU acceleration, significantly improving computational efficiency<ref name="Han2018" /><ref name="Beck2019" />.
 
===Disadvantages===
Sources:<ref name="Han2018" /><ref name="Beck2019" />
# Training Time: Training deep neural networks typically requires substantial data and computational resources.
# Training time: Training deep neural networks typically requires substantial data and computational resources.
# Parameter Sensitivity: The choice of neural network architecture and hyperparameters greatly impacts the results, often requiring experience and trial-and-error<ref name="Han2018" /><ref name="Beck2019" />.
# Parameter sensitivity: The choice of neural network architecture and hyperparameters greatly impacts the results, often requiring experience and trial-and-error.
 
==See Alsoalso==
{{Div col|colwidth=22em}}
* [[Deep Learning]]
* [[Stochastic differentialBellman equation]]
* [[FinancialDynamic Derivativesprogramming]]
* [[Applications of artificial intelligence]]
* [[Monte Carlo Method]]
* [[CurseList of Dimensionalityartificial intelligence projects]]
* [[Backward stochastic differential equation]]
 
* [[Stochastic process]]
==External Links==
* [[Stochastic volatility]]
* [Deep Learning for High-Dimensional PDEs](https://arxiv.org/abs/1707.02568)
* [[Stochastic partial differential equations]]
* [Backward Stochastic Differential Equations](https://www.math.ku.dk/english/research/conferences/2018/bsde/)
* [[Diffusion process]]
* [Curse of Dimensionality - Scholarpedia](http://www.scholarpedia.org/article/Curse_of_dimensionality)
* [[Stochastic difference equation]]
{{div col end}}
 
==References==
{{Reflist}}
==Further reading==
* {{cite book |last1=Bishop |first1=Christopher M. |last2=Bishop |first2=Hugh |title=Deep learning: foundations and concepts |date=2024 |publisher=Springer |isbn=978-3-031-45467-7}}
* {{cite book
|title=Deep Learning
|year=2016
|first1=Ian
|last1=Goodfellow
|author-link1=Ian Goodfellow
|first2=Yoshua
|last2=Bengio
|author-link2=Yoshua Bengio
|first3=Aaron
|last3=Courville
|publisher=MIT Press
|url=http://www.deeplearningbook.org
|isbn=978-0-26203561-3
|postscript=, introductory textbook.
|access-date=2021-05-09
|archive-date=2016-04-16
|archive-url=https://web.archive.org/web/20160416111010/http://www.deeplearningbook.org/
|url-status=live
}}
* [[Lawrence C. Evans|Evans, Lawrence C.]] (2013). [https://bookstore.ams.org/mbk-82 An Introduction to Stochastic Differential Equations] American Mathematical Society.
* {{cite journal|last1=Higham.|first1=Desmond J.|title=An Algorithmic Introduction to Numerical Simulation of Stochastic Differential Equations|journal=SIAM Review|date=January 2001|volume=43|issue=3|pages=525–546|doi=10.1137/S0036144500378302|bibcode=2001SIAMR..43..525H|citeseerx=10.1.1.137.6375}}
* Desmond Higham and Peter Kloeden: "An Introduction to the Numerical Simulation of Stochastic Differential Equations", SIAM, {{ISBN|978-1-611976-42-7}} (2021).
 
{{Numerical PDE}}
{{Industrial and applied mathematics}}
 
{{DEFAULTSORT:Numerical Partial Differential Equations}}
[[Category:Numerical differential equations| ]]
[[Category:Stochastic simulation]]
[[Category:Numerical analysis]]