Expand description
Stochastic differential equation solvers — Euler–Maruyama and Milstein.
Supports two drift types:
- GBM:
dX = μ·X·dt + σ·X·dW(geometric Brownian motion, e.g. prices) - OU:
dX = θ·(μ − X)·dt + σ·dW(Ornstein–Uhlenbeck, mean reversion)
Milstein adds the second-order correction 0.5·σ·σ'·X·(ΔW² − dt), which
is non-zero only for GBM (the OU diffusion is constant).
Also provides a two-level multilevel Monte Carlo (MLMC) extrapolation:
E ≈ E_fine + (E_fine − E_coarse) — a cheap variance-reduction trick
for terminal-statistic estimates.
Structs§
- MlMc
Result - Result of a multilevel Monte Carlo run.
- SdeConfig
- SDE configuration.
- SdeResult
- Terminal statistics over all paths.
Enums§
Functions§
- solve
- Solve the SDE and return terminal-value statistics.
- solve_
mlmc - Two-level multilevel Monte Carlo estimate of the mean terminal value.