Last updated: 2023-03-16.
tf_quant_finance.math.pde.steppers.douglas_adi.douglas_adi_step#
Creates a stepper function with Crank-Nicolson time marching scheme.
tf_quant_finance.math.pde.steppers.douglas_adi.douglas_adi_step(
theta=0.5
)
Douglas ADI scheme is the simplest time marching scheme for solving parabolic
PDEs with multiple spatial dimensions. The time step consists of several
substeps: the first one is fully explicit, and the following N steps are
implicit with respect to contributions of one of the N axes (hence “ADI” -
alternating direction implicit). See douglas_adi_scheme below for more
details.
Args:#
theta: positive Number.theta = 0corresponds to fully explicit scheme. The largerthetathe stronger are the corrections by the implicit substeps. The recommended value istheta = 0.5, because the scheme is second order accurate in that case, unless mixed second derivative terms are present in the PDE.
Returns:#
Callable to be used in finite-difference PDE solvers (see fd_solvers.py).