Deep backward stochastic differential equation method explained

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.[1]

History

Backwards stochastic differential equations

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.[2]

Deep learning

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.[3]

Limitations of Traditional Numerical Methods

Tranditional numerical methods for solving stochastic differential equations[4] include the Euler–Maruyama method, Milstein method, Runge–Kutta method (SDE) and methods based on different representations of iterated stochastic integrals.[5] [6]

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.[7]

  1. 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.[8] [9]
  2. 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.[10]

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.

Model

Mathematical method

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.[11]

A backward stochastic differential equation (BSDE) can be formulated as:[12]

Yt=\xi+

T
\int
t

f(s,Ys,Zs)ds-

T
\int
t

ZsdWs,t\in[0,T]

In this equation:

\xi

is the terminal condition specified at time

T

.

f:[0,T] x R x R\toR

is called the generator of the BSDE

(Yt,Zt)t\in[0,T]

is the solution consists of stochastic processes

(Yt)t\in[0,T]

and

(Zt)t\in[0,T]

which are adapted to the filtration

(l{F}t)t\in

Ws

is a standard Brownian motion.

The goal is to find adapted processes

Yt

and

Zt

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.[13]

Methodology overview

Source:[14]

1. Semilinear parabolic PDEs

We consider a general class of PDEs represented by

\partialu
\partialt

(t,x)+

1
2
T(t,x)\left(Hess
Tr\left(\sigma\sigma
x

u(t,x)\right)\right)+\nablau(t,x)\mu(t,x)+f\left(t,x,u(t,x),\sigmaT(t,x)\nablau(t,x)\right)=0

In this equation:

u(T,x)=g(x)

is the terminal condition specified at time

T

.

t

and

x

represent the time and

d

-dimensional space variable, respectively.

\sigma

is a known vector-valued function,

\sigmaT

denotes the transpose associated to

\sigma

, and

Hessxu

denotes the Hessian of function

u

with respect to

x

.

\mu

is a known vector-valued function, and

f

is a known nonlinear function.

2. Stochastic process representation

Let

\{Wt\}t

be a

d

-dimensional Brownian motion and

\{Xt\}t

be a

d

-dimensional stochastic process which satisfies

Xt=\xi+

t
\int
0

\mu(s,Xs)ds+

t
\int
0

\sigma(s,Xs)dWs

3. Backward stochastic differential equation(BSDE)

Then the solution of the PDE satisfies the following BSDE:

u(t,Xt)-u(0,X0)

=-

t
\int
0

f\left(s,Xs,u(s,Xs),\sigmaT(s,Xs)\nablau(s,Xs)\right)ds+

t
\int
0

\nablau(s,Xs)\sigma(s,Xs)dWs

4. Temporal discretization

Discretize the time interval

[0,T]

into steps

0=t0<t1<<tN=T

:
X
tn+1

-

X
tn

\mu(tn,

X
tn

)\Deltatn+\sigma(tn,

X
tn

)\DeltaWn

u(tn,

X
tn+1

)-u(tn,

X
tn

)

-f\left(tn,

X
tn

,u(tn,

X
tn

),

T(t
\sigma
n,
X
tn

)\nablau(tn,

X
tn

)\right)\Deltatn+\left[\nablau(tn,

X
tn

)\sigma(tn,

X
tn

)\right]\DeltaWn

where

\Deltatn=tn+1-tn

and

\DeltaWn=

W
tn+1

-Wn

.

5. Neural network approximation

Use a multilayer feedforward neural network to approximate:

T(t
\sigma
n,

Xn)\nablau(tn,Xn)(\sigmaT\nablau)(tn,Xn;\thetan)

for

n=1,\ldots,N

, where

\thetan

are parameters of the neural network approximating

x\mapsto\sigmaT(t,x)\nablau(t,x)

at

t=tn

.

6. Training the neural network

Stack all sub-networks in the approximation step to form a deep neural network. Train the network using paths

\{X
tn

\}0

and
\{W
tn

\}0

as input data, minimizing the loss function:

l(\theta)=E\left|

g(X
tN

)-

\hat{u}\left(\{X
tn

\}0,

\{W
tn

\}0;\theta\right)\right|2

where

\hat{u}

is the approximation of

u(t,Xt)

.

Neural network architecture

Source: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 networks or recurrent neural networks) and selecting effective optimization algorithms.[15]

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

Y

and

Z

, and utilizes stochastic gradient descent and other optimization algorithms for training.

The fig illustrates the network architecture for the deep BSDE method. Note that

\nablau(tn,

X
tn

)

denotes the variable approximated directly by subnetworks, and

u(tn,

X
tn

)

denotes the variable computed iteratively in the network. There are three types of connections in this network:

i)

X
tn

n
h
1

n
h
2

\ldots

n
h
H

\nablau(tn,

X
tn

)

is the multilayer feedforward neural network approximating the spatial gradients at time

t=tn

. The weights

\thetan

of this subnetwork are the parameters optimized.

ii)

(u(tn,

X
tn

),\nablau(tn,

X
tn

),

W
tn+1

-

W
tn

)u(tn+1,

X
tn+1

)

is the forward iteration providing the final output of the network as an approximation of

u(tN,

X
tN

)

, characterized by Eqs. 5 and 6. There are no parameters optimized in this type of connection.

iii)

(X
tn

,

W
tn+1

-

W
tn

)

X
tn+1

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

Adam optimizer

This function implements the Adam[16] algorithm for minimizing the target function

l{G}(\theta)

.

Function: ADAM(

\alpha

,

\beta1

,

\beta2

,

\epsilon

,

l{G}(\theta)

,

\theta0

) is

m0:=0

// Initialize the first moment vector

v0:=0

// Initialize the second moment vector

t:=0

// Initialize timestep // Step 1: Initialize parameters

\thetat:=\theta0

// Step 2: Optimization loop while

\thetat

has not converged do

t:=t+1

gt:=\nabla\thetal{G}t(\thetat-1)

// Compute gradient of

l{G}

at timestep

t

mt:=\beta1mt-1+(1-\beta1)gt

// Update biased first moment estimate

vt:=\beta2vt-1+(1-\beta2)

2
g
t
// Update biased second raw moment estimate

\widehat{m}t:=

mt
(1-
t)
\beta
1
// Compute bias-corrected first moment estimate

\widehat{v}t:=

vt
(1-
t)
\beta
2
// Compute bias-corrected second moment estimate

\thetat:=\thetat-1-

\alpha\widehat{m
t}{(\sqrt{\widehat{v}

t}+\epsilon)}

// Update parameters return

\thetat

Backpropagation algorithm

This function implements the backpropagation algorithm for training a multi-layer feedforward neural network.

Function: BackPropagation(set

D=\left\{(xk,yk)\right\}

m
k=1
) is // Step 1: Random initialization // Step 2: Optimization loop repeat until termination condition is met: for each

(xk,yk)\inD

:

\hat{y

}_k := f(\beta_j - \theta_j) // Compute output // Compute gradients for each output neuron

j

:

gj:=

k
\hat{y}
j

(1-

k
\hat{y}
j

)

k
(\hat{y}
j

-

k
y
j

)

// Gradient of output neuron for each hidden neuron

h

:

eh:=bh(1-bh)

\ell
\sum
j=1

whjgj

// Gradient of hidden neuron // Update weights for each weight

whj

:

\Deltawhj:=ηgjbh

// Update rule for weight for each weight

vih

:

\Deltavih:=ηehxi

// Update rule for weight // Update parameters for each parameter

\thetaj

:

\Delta\thetaj:=gj

// Update rule for parameter for each parameter

\gammah

:

\Delta\gammah:=eh

// Update rule for parameter // Step 3: Construct the trained multi-layer feedforward neural network return trained neural network

Numerical solution for optimal investment portfolio

Source:

This function calculates the optimal investment portfolio using the specified parameters and stochastic processes.

function OptimalInvestment(

W
ti+1

-

W
ti
,

x

,

\theta=(X0,H0,\theta1,\theta2,...,\thetaN-1)

) is // Step 1: Initialization for

k:=0

to maxstep do
k,m
M
0

:=0

,
k,m
X
0

:=

k
X
0
// Parameter initialization for

i:=0

to

N-1

do
k,m
H
ti

:=

k,m
l{NN}(M
ti

;

k)
\theta
i
// Update feedforward neural network unit
k,m
M
ti+1

:=

k,m
M
ti

+((1-

\phi)(\mu
ti

-

k,m
M
ti

))(ti+1-ti)+

\sigma
ti
(W
ti+1

-

W
ti

)

k,m
X
ti+1

:=

k,m
X
ti

+

k,m
[H
ti

(\phi

k,m
(M
ti

-

\mu
ti

)+

\mu
ti

)](ti+1-ti)+

k,m
H
ti
(W
ti+1

-

W
ti

)

// Step 2: Compute loss function

l{L}(t):=

1
M
M
\sum
m=1

\left|

k,m
X
tN

-

k,m
g(M
tN

)\right|2

// Step 3: Update parameters using ADAM optimization

\thetak+1:=\operatorname{ADAM}(\thetak,\nablal{L}(t))

k+1
X
0

:=

k,
\operatorname{ADAM}(X
0

\nablal{L}(t))

// Step 4: Return terminal state return
(M
tN

,

X
tN

)

Application

Deep BSDE is widely used in the fields of financial derivatives pricing, risk management, and asset allocation. It is particularly suitable for:

Advantages and disadvantages

Advantages

Sources:

  1. High-Dimensional Capability: Compared to traditional numerical methods, deep BSDE performs exceptionally well in high-dimensional problems.
  2. Flexibility: The incorporation of deep neural networks allows this method to adapt to various types of BSDEs and financial models.
  3. Parallel Computing: Deep learning frameworks support GPU acceleration, significantly improving computational efficiency.

Disadvantages

Sources:

  1. Training Time: Training deep neural networks typically requires substantial data and computational resources.
  2. Parameter Sensitivity: The choice of neural network architecture and hyperparameters greatly impacts the results, often requiring experience and trial-and-error.

See also

Further reading

Notes and References

  1. Han . J. . Jentzen . A. . E . W. . Solving high-dimensional partial differential equations using deep learning . Proceedings of the National Academy of Sciences . 115 . 34 . 8505-8510 . 2018 .
  2. Pardoux . E. . Peng . S. . Adapted solution of a backward stochastic differential equation . Systems & Control Letters . 14 . 1 . 55-61 . 1990 .
  3. LeCun . Yann. Bengio . Yoshua . Hinton . Geoffrey. 3074096 . 2015 . Deep Learning . Nature . 521 . 7553 . 436–444 . 10.1038/nature14539 . 26017442. 2015Natur.521..436L .
  4. 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
  5. 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
  6. 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
  7. Han . J. . Jentzen . A. . E . W. . Solving high-dimensional partial differential equations using deep learning . Proceedings of the National Academy of Sciences . 115 . 34 . 8505-8510 . 2018 .
  8. Web site: Real Options with Monte Carlo Simulation . 2010-09-24 . https://web.archive.org/web/20100318060412/http://www.puc-rio.br/marco.ind/monte-carlo.html . 2010-03-18 . dead .
  9. Web site: Monte Carlo Simulation . Palisade Corporation . 2010 . 2010-09-24 .
  10. Book: Christian Grossmann. Hans-G. Roos. Martin Stynes. Numerical Treatment of Partial Differential Equations. limited. 2007. Springer Science & Business Media. 978-3-540-71584-9. 23.
  11. Pardoux . E. . Peng . S. . Adapted solution of a backward stochastic differential equation . Systems & Control Letters . 14 . 1 . 55-61 . 1990 .
  12. Book: Ma. Jin. Yong. Jiongmin. 2007. Forward-Backward Stochastic Differential Equations and their Applications. Lecture Notes in Mathematics . 1702 . Springer Berlin, Heidelberg. 10.1007/978-3-540-48831-6 . 978-3-540-65960-0 .
  13. Han . J. . Jentzen . A. . E . W. . Solving high-dimensional partial differential equations using deep learning . Proceedings of the National Academy of Sciences . 115 . 34 . 8505-8510 . 2018 .
  14. Han . J. . Jentzen . A. . E . W. . Solving high-dimensional partial differential equations using deep learning . Proceedings of the National Academy of Sciences . 115 . 34 . 8505-8510 . 2018 .
  15. LeCun . Yann. Bengio . Yoshua . Hinton . Geoffrey. 3074096 . 2015 . Deep Learning . Nature . 521 . 7553 . 436–444 . 10.1038/nature14539 . 26017442. 2015Natur.521..436L .
  16. 1412.6980 . cs.LG . Diederik . Kingma . Jimmy . Ba . Adam: A Method for Stochastic Optimization . 2014.
  17. Beck . C. . E . W. . Jentzen . A. . Machine learning approximation algorithms for high-dimensional fully nonlinear partial differential equations and second-order backward stochastic differential equations . Journal of Nonlinear Science . 29 . 4 . 1563-1619 . 2019 .
  18. Beck . C. . E . W. . Jentzen . A. . Machine learning approximation algorithms for high-dimensional fully nonlinear partial differential equations and second-order backward stochastic differential equations . Journal of Nonlinear Science . 29 . 4 . 1563-1619 . 2019 .