This module is a toolbox for generating and calibrating Diffusion
Models. A model is derived from the ItoProcess
class. The model is
described in terms of the underying stochastic differential equation (SDE):
where
For example, the Geometric Brownian Motion is an underlying of the Black-Scholes model.
A minimal description of the model class should contain the following methods:
-
dim
- dimensionality of the underlying SDE; -
dtype
- dtype of the model coefficients; -
name
- name of the model class; -
drift_fn
- drift rate of the process expressed as a callable which maps time and position to a vector. (corresponds to the$$a_i$$ above); -
volatility_fn
- volatility of the process expressed as a callable which maps time and position to a volatility matrix(corresponds to the$$S_{ij}$$ above); -
sample_paths
- return sample paths of the process at specified time points. The base class provides Euler scheme sampling if the drift and volatility functions are defined; -
fd_solver_backward
- returns a finite difference method for solving the Feynman Kac PDE associated with the SDE. This equation is a slight generalization of the Kolmogorov backward equation with the inclusion of a discounting function. The Feynman Kac PDE is:
with the final value condition
The corresponding Kolmogorov forward/Fokker Plank equation is
with the initial value condition
A minimum description of the model should only include dim
, dtype
,
and name
. In order to use the provided sample_paths
method,
both drift_fn
and volatility_fn
should be defined.
TODO(b/140290854): Provide description of model calibration procedure. TODO(b/140313472): Provide description of Ito process algebra API.