tf_quant_finance.math.pde.steppers.implicit.implicit_step

Contents

Last updated: 2023-03-16.

tf_quant_finance.math.pde.steppers.implicit.implicit_step#

View source

Creates a stepper function with implicit time marching scheme.

tf_quant_finance.math.pde.steppers.implicit.implicit_step()

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), the implicit time marching scheme approximates the right-hand side with its value after the time step:

(u(t2) - u(t1)) / (t2 - t1) = A(t2) u(t2) + b(t2)

This scheme is stable, but 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 - implicit scheme is a special case with theta = 0.

Returns:#

Callable to be used in finite-difference PDE solvers (see fd_solvers.py).