Repository navigation
This release completes the eight-stage PDE review remediation since v2.18.0 for stochvolmodels: numerical fixes, public solver packaging, reproducible historical comparisons, and executable documentation. The PDE and local stochastic volatility (LSV) interfaces remain provisional; the LogSV PDE pricer is opt-in.
Release source: c7b837c. Python: 3.11.5 or newer.
pip install stochvolmodels==2.18.8PDE review fixes
- Monte Carlo time units: the classical LogSV chain wrapper now defaults to 360 steps per year, giving seven steps for a one-week interval. Explicit rates retain annual units. The historical BTC forward-variance replay explicitly retains its 156-step annual rate.
- Dupire conversion: instantaneous estimates are converted to effective interval variances. Flat diffusion smiles use increments of total implied variance; skewed and jump-adjusted surfaces use a bounded near-forward price fit. Raw and repaired inversion results remain available.
- PDE resolution and density checks: mixed-expiry grids resolve the shortest quote while retaining the long-expiry domain. LogSV pricing and LSV projection use quadratic startup from the initial point mass. The 1D and 2D pricers report boundary mass, with an optional market acceptance limit.
- LSV fitter robustness: defaults use 64 steps per coefficient bucket and a terminal negative-mass limit of
1e-4; fixed-point fitting allows 20 iterations per expiry. Recoverably invalid optimizer trials receive finite penalties and recorded causes, and the final candidate requires a fresh admissible replay. Explicit strict tolerances remain supported. - Transform and backbone conventions: short-expiry Fourier grids refine frequency spacing while retaining the tail cutoff. Time-varying return-volatility loadings are applied backward from each payoff, splitting at every calendar knot, including unquoted ones; classical Monte Carlo splits at those same knots. Passing a bare backbone to
LogSvPdePricernow points toLSVModel.from_params(params). - Repricing and stepping: leverage fitters support internal dates, midpoint collocation and independently repriced strike-level residuals. The local-volatility pricer starts each interval with two implicit Euler half-steps and continues with Crank–Nicolson. Historical end-collocation, uniform-start and Euler settings remain available where documented.
- Solver implementation and distribution: alternating-direction implicit (ADI) sweeps batch directional solves and reuse tridiagonal factors. The full generic engine is public, including translation-jump operators, density valuation and LogSV coefficient adapters. Historical LSV references run in public source CI and remain outside installed distributions.
- Documentation and examples: dedicated solver and local-volatility/LSV guides, refinement exhibits and rendered APIs explain model, product, pricer and fitter ownership. CI runs self-contained module examples and guide scripts against the installed core wheel. Release history, terminology and random-number guidance were corrected.
See the tagged changelog for individual changes and compatibility settings.
Verification
| Check | Result |
|---|---|
| Full source qualification | 1,693 passed; four local-data cases skipped in the clean export and subsequently verified against the frozen inputs |
| Core installed wheel | 1,150 passed; 357 repository/optional-dependency skips; 68 slow cases deselected |
| Tagged release workflow | 1,600 source tests passed; Windows numerical suite: 63 passed. Optional/local-data skips are recorded in the logs |
| Historical comparisons | All 26 LSV comparisons, BTC baseline/adverse starts, seven stress scenarios, IJTAF Figures 6 and 3, Figure 8 impermanent loss, barrier and forward-variance comparisons passed |
| Robust-volatility review | SPXW, GLD, TLT and positive-skew TLT: 393/393 quote limits passed using local frozen inputs |
| Documentation | Strict HTML, 100 Sphinx doctests, 103 module examples and seven guide cases passed; public links and rendered API anchors verified |
| Published distributions | Wheel: 190 files; sdist: 197 files. All 183 packaged Python files match the release commit |
Required CI, external documentation health, and the publication workflow completed successfully. The released documentation also passed its Read the Docs build.
Known numerical limits
- The 2D mixed stencil can produce signed densities. Check negative mass, forward moments, boundary occupancy and grid refinement together. The boundary-mass acceptance limit is configurable and off by default.
- Monte Carlo standard errors measure sampling uncertainty. Time-discretization bias still requires refinement, particularly for short-dated wings; 360 steps/year is not a universal convergence guarantee.
- Dupire repair, bounded leverage and finite time buckets can leave material quote residuals. Assess independent vanilla repricing as well as fitter convergence. In the historical frozen-BTC acceptance fixture, the baseline covers 35/44 common-strike IVs inside bid/ask and the adverse start covers 12/44. The adverse start, extreme-correlation and narrow-domain cases intentionally test rejection behavior.
- The corrected calendar-time second-order transform retains a maximum 25.00 basis-point premium difference, normalized by discounted forward, against the refined PDE in the frozen BTC comparison. Expansion truncation and finite-grid errors remain distinct sources of uncertainty.
Historical compatibility settings reproduce the documented older conventions. Regression success establishes the stated fixture comparisons and acceptance decisions; production use requires validation of the chosen parameters, grids and tolerances.
Documentation
- Finite-difference solver guide
- Opt-in LogSV PDE pricing
- Local volatility, Dupire inversion and LSV
- PDE API reference
Published downloads
Both files are available on PyPI 2.18.8. Their downloaded SHA-256 hashes match the verified release-workflow manifest.
| Artifact | SHA-256 |
|---|---|
| Wheel: stochvolmodels-2.18.8-py3-none-any.whl | d2553c77e9e9d93fec0b0fe4076ad7bd011f0940c06ac46092b77e05dfdba9f7 |
| Source: stochvolmodels-2.18.8.tar.gz | 822b40d6af53e6ebc7c6c35f2b81b1e5f24949cf3873a22bd7c4fd1adf07d07f |
Maintainer: Artur Sepp. Software citation: CITATION.cff.