tf_quant_finance.math.pde.steppers.composite_stepper.composite_scheme_step

Contents

Last updated: 2023-03-16.

tf_quant_finance.math.pde.steppers.composite_stepper.composite_scheme_step#

View source

Composes two time marching schemes.

tf_quant_finance.math.pde.steppers.composite_stepper.composite_scheme_step(
    first_scheme_steps, first_scheme, second_scheme
)

Applies a step of parabolic PDE solver using first_scheme if number of performed steps is less than first_scheme_steps, and using second_scheme otherwise.

Args:#

  • first_scheme_steps: A Python integer. Number of steps to apply first_scheme on.

  • first_scheme: First time marching scheme (see time_marching_scheme argument of parabolic_equation_step).

  • second_scheme: Second time marching scheme (see time_marching_scheme argument of parabolic_equation_step).

Returns:#

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