Last updated: 2023-03-16.
tf_quant_finance.math.pde.steppers.explicit.explicit_step#
Creates a stepper function with explicit time marching scheme.
tf_quant_finance.math.pde.steppers.explicit.explicit_step()
Explicit time marching scheme is the simplest scheme for 1D PDEs. Given a space-discretized equation
du/dt = A(t) u(t) + b(t)
(here u is a value vector, A and b are the matrix and the vector defined
by the PDE), it approximates the right-hand side with its value before the
time step:
(u(t2) - u(t1)) / (t2 - t1) = A(t1) u(t1) + b(t1)
This scheme avoids any matrix inversions and thus is much faster than other schemes. It is, however, stable only with small time steps and is only first order accurate. Usually, Crank-Nicolson or Extrapolation schemes are preferable.
More details can be found in weighted_implicit_explicit.py describing the
weighted implicit-explicit scheme - explicit scheme is a special case
with theta = 1.
Returns:#
Callable to be used in finite-difference PDE solvers (see fd_solvers.py).