Repository navigation
StochVolModels 2.18.0 — PDE solvers, LogSV pricing and LSV calibration
StochVolModels 2.18.0 makes the 1D and 2D finite-difference solvers available as provisional Python APIs. It adds opt-in PDE pricing for European LogSV options and a local stochastic volatility (LSV) calibration workflow that can be checked against independent Monte Carlo prices. Model and pricer documentation
Solver guide · LogSV PDE pricing guide · API reference
The four integration stages
- Generic solvers.
stochvolmodels.pde_solversexposes the 1D theta solver and the 2D alternating-direction implicit (ADI) solver. This release fixes linear extrapolation on nonuniform grids and rejects nonzero covariance when either variance is zero. Regression tests cover Black and Gaussian limits, boundary mass and the adjoint relationship between forward and backward solves. - LogSV vanilla pricing.
LogSvPdePricerprices European calls and puts under the money-market measure, using each expiry’s strikes, forward and discount factor. On the audited fine grids, the largest price differences against the IJTAF transform solver were 0.145 basis points of discounted forward for the published SPY case and 1.090 for the BTC control. The comparisons also used a spectral solver and Monte Carlo. - Paper replications. The BTC final-fit replay covered 49 quotes across four expiries, with a maximum price gap of 1.378 basis points of discounted forward. Impermanent-loss Figure 8 covered 57 protection values and 93 smile quotes, with a maximum protection APR gap of 0.0468 annualized percentage points. The comparisons also cover IJTAF Figure 6 terminal marginals and Figure 3 expected quadratic variance, barrier survival, 222 vanilla prices at every forward-variance backbone knot, and 393 fixed-parameter quotes across SPXW, GLD, TLT and positive-skew TLT. Replication guide
- Local volatility and LSV. The workflow supports deterministic local volatility, continuous and fixed-jump Dupire inversion, conditional variance projection, and fixed-point and parametric leverage calibration. The
OptionChainadapter preserves the raw and repaired surfaces. PDE and Monte Carlo pricing share the same jump law. On frozen BTC data, the baseline passed all seven acceptance checks, with 35 of 44 common strikes inside bid–ask. The adverse start reproduced four failed checks, with 12 of 44 inside bid–ask. Frozen BTC example
Known numerical limits
- The largest forward-variance discrepancy occurred at the final backbone knot for the calibrated BTC 80,000 call. The PDE and the paper’s expansion differed by 25.87 basis points of discounted forward, or 2.62 bid–ask spreads.
- The barrier adapter reproduces the historical survival calculation to roundoff. Including the first time interval omitted by the historical backward loop changed survival probability by up to 0.01884.
- The ADI density can carry negative mass between expiries even when the expiry density passes its check. The pricer reports both peak and expiry negative mass. All seven archived stress decisions were reproduced. Both near-singular correlation cases failed the negative-mass check, and the narrow price grid failed the vanilla price check. Stress example
Verification and downloads
The full local source suite passed 1,590 tests, plus 76 private PDE tests. The tagged release workflow passed 1,487 Linux source tests (21 skipped) and 43 Windows numerical tests (22 skipped). It built the wheel from the sdist and tested the installed wheel outside the checkout. Release workflow
The SHA-256 digest of each file downloaded from PyPI matched its entry in the release workflow’s manifest. PyPI release
| Distribution | SHA-256 |
|---|---|
| stochvolmodels-2.18.0-py3-none-any.whl | 29839425616187a4208d335c4ec589c0368be209fd77d6f35c4f5c876f88a652 |
| stochvolmodels-2.18.0.tar.gz | 63ccd93c7ba52d99db655d76f8f1509dbaa720d6e6a65a74a7dc85b25390573f |