This package provides a solver for the following FBSDE:
solver.py
contains the main solver based on the Deep BSDE method proposed in [1].
cir_bond.py
and multi_cir_bond.py
are codes for the examples in [2].
One can easily apply this solver to other FBSDEs by redefining the coefficients and parameters.
It is important to notice that the output of the coefficient should be defined in an appropriate size. Here, we list the corresponding size as follows.
Coefficient | Output Size |
---|---|
[batch_size, dim_x] | |
[batch_size, dim_x, dim_d] | |
[batch_size, dim_y] | |
[batch_size, dim_y] |
The training data will be saved in loss_data.npy
and y0_data.npy
which record the loss
- Pytorch >= 1.4.0
- Numpy
[1] E, W., Han, J., and Jentzen, A. Deep learning-based numerical methods for high-dimensional parabolic partial differential equations and backward stochastic differential equations, Communications in Mathematics and Statistics, 5, 349–380 (2017).
[2] Jiang, Y., Li, J. Convergence of the deep BSDE method for FBSDEs with non-lipschitz coefficients, Probability, Uncertainty and Quantitative Risk, 6 (4), 391-408 (2021).