Skip to main content

Module process

Module process 

Source
Expand description

Generic Itô-process abstraction: the SDE’s coefficients live in the process object and the discretization schemes are written once against them — the QuantLib StochasticProcess / TF Quant Finance GenericItoProcess pattern.

dX = a(t, X) dt + b(t, X) dW
  • StochasticProcess1D is the scalar contract; Euler and Milstein are provided methods over drift / diffusion, so a new SDE (Vasicek / Hull-White, CEV, CIR, …) only supplies coefficients.
  • Processes with a closed-form transition density override exact_step (lognormal for Black-Scholes, Gaussian for Ornstein-Uhlenbeck); models whose good schemes are genuinely model-specific (Heston full-truncation / QE) override evolve wholesale.
  • State constraints belong to the process, not the stepper: a lognormal equity floors at zero via constrain, while a normal-SDE short rate legitimately goes negative (the default is the identity).
  • StochasticProcess is the N-state / M-factor generalization (Heston: 2 states driven by 2 correlated factors, the correlation folded into the diffusion matrix rows).

Enums§

DiscretizationScheme
Time-stepping scheme for path-wise simulation. Exact samples the process’s closed-form transition where one exists (no discretization bias) and degrades to Euler where none does; Euler and Milstein are the standard approximate schemes.

Traits§

StochasticProcess
An N-state Itô process driven by M independent Brownian factors: dX_i = a_i(t, X) dt + Σ_j b_ij(t, X) dW_j. Factor correlation is expressed through the rows of the diffusion matrix (its Cholesky structure), so dw always carries independent increments.
StochasticProcess1D
A scalar Itô process dX = a(t, X) dt + b(t, X) dW.

Functions§

numeric_diffusion_dx
Central finite difference of the diffusion coefficient in the state — the default for StochasticProcess1D::diffusion_dx, callable from implementations that override it for one branch of their dynamics.