Skip to content

Commit fbb19a6

Browse files
feat(oracle): 200-bit mpmath floor oracle + v1.0.1 release notes
Add an independent 200-bit mpmath oracle that measures voltic, py_lets_be_rational, and volfi as distance-from-the-f64-inversion-floor on the canonical SplitMix64-seeded dataset. Reframes the v1.0.0 accuracy claim ("matches LBR to 1e-15") into "at the f64 floor, independently verified against 200-bit mpmath." Methodology. For each option in the dataset: 1. Promote (S, K, T, r, sigma_true) to mpf at 200 bits. 2. Compute the 200-bit BS price. 3. sigma_truth_mpmath := invert the 200-bit price (sanity check on the oracle itself; must agree with sigma_true to << 1e-40). 4. sigma_truth_floor := invert the f64 price the dataset carries (the one the f64 solvers see). This is the inversion's physical floor — no f64 solver can do better. 5. f64_floor := |sigma_truth_floor - sigma_true|. 6. <solver>_err := |sigma_<solver> - sigma_truth_floor|. Oracle self-consistency on the 100k subsample: 7.5e-56. Passes the 1e-40 acceptance threshold by 16 orders of magnitude. Per-band results (oracle bucketing by N(-d2); deep_otm/deep_itm both correspond to the deep wings of the moneyness-vega plane): band n voltic max LBR max volfi max volfi cat (>=1e-3) deep_otm 12730 2.2e-11 2.0e-11 3.2e-1 439 / 12726 (3.45%) near_atm 506 5.9e-15 2.3e-15 1.3e-11 0 / 506 (0%) deep_itm 12969 4.3e-15 1.7e-15 3.3e-1 474 / 12969 (3.65%) other 73795 1.9e-13 1.2e-13 1.4e-5 0 / 73795 (0%) ----------------------------------------------------------------------- all 100000 2.2e-11 2.0e-11 3.3e-1 913 / 99996 (0.91%) voltic and LBR sit at the floor across all bands. volfi has a silent ~0.91% catastrophic-precision tail in the deep wings (3-4% rate per deep-wing band, max sigma error 3.3e-1). Independently confirmed by Verifier B via hand-coded direct repro, put-call parity cross-check via two paths, alternate volfi entry point, and volfi's own bs_call formula. voltic vs LBR: mild 2-4x median ratio in the deep_otm tail (max absolute 9.9e-12 - sub-picovol). Jaeckel's rational guess wins by design in that corner; tightening voltic's deep_otm seed is v1.1 work. Documented as a known gap. Speed (single-threaded, znver5, taskset -c 0, same dataset; the Python rows are a 100k subsample so total wall stays under a few seconds): voltic 1.0.1 implied_vol_fast Rust f64x8 SIMD 73.6 ns 3.4e-11 0 NaN py_lets_be_rational (scalar) Python+C++ 3475 ns 1.5e-11 0 NaN py_vollib_vectorized Python+C++ (np) 406 ns 2.0e-11 0 NaN volfi 0.1.8 iv_call C++ binding 350 ns 3.3e-1 1 NaN voltic is ~48x faster than LBR scalar and ~5x faster than the vectorized Python paths, at the same f64 accuracy floor. Files: - bench/python/oracle_mpmath.py: +200-bit mpmath oracle (~370 LOC) - bench/python/requirements.txt: +mpmath==1.4.1 - .gitignore: +bench/python/*.csv, *.log - README.md: rewritten around LBR-floor framing, volfi tail finding, fair speed table (drops the v1.0.0 strawman comparing voltic split-context vs volfi one-shot). Single line "For consulting: ryan@databa.ai". - CHANGELOG.md: +v1.0.1 entry - Cargo.toml: version 1.0.0 -> 1.0.1
1 parent d620851 commit fbb19a6

6 files changed

Lines changed: 588 additions & 134 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/target
22
/Cargo.lock
33
/*.csv
4+
bench/python/*.csv
5+
bench/python/*.log
46
__pycache__/
57
*.pyc
68
/.venv/

CHANGELOG.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,86 @@ All notable changes to voltic are documented here. The format follows
44
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
55
follows semantic versioning.
66

7+
## [1.0.1] — 2026-05-31
8+
9+
Analytic wing-seed for the deep-wing regime, plus an independent 200-bit
10+
mpmath oracle that reframes accuracy claims around the f64 inversion floor.
11+
12+
### Added
13+
14+
- **Analytic wing-seed** for `|k_log| ∈ [2.95, 8.0]`, derived clean-room
15+
from Schadner's IG-quantile and the 2-term Mills asymptotic. Replaces a
16+
v1.0.0 path that extrapolated the Chebyshev seed beyond its fit domain
17+
(`SEED_K_HI = 3.0`) and produced 3.27e-1 catastrophic errors on a
18+
wing-saturated stress grid. Dispatch gates: `K_HI_BAILOUT = 2.95`,
19+
`WING_Q_MAX = 0.30`, `WING_H_MAX = 8.0`. The leading term is W0
20+
followed by `N_PICARD = 1` then HH3 polish; the collapse
21+
`e^h · Φ(−z2) ≡ φ(z1) · Q(z2)` (with `Q(z) := √(π/2) · erfcx(z/√2)
22+
≈ 1/z − 1/z³`) eliminates the `exp(h)` overflow on the wing.
23+
See `src/schadner_fast.rs::wing_seed_simd`.
24+
- **200-bit mpmath oracle** `bench/python/oracle_mpmath.py` measuring
25+
voltic, py_lets_be_rational, and volfi as distance-from-the-f64-
26+
inversion-floor on the SplitMix64-seeded dataset. Oracle self-
27+
consistency at 7.5e-56 (passes 1e-40 acceptance by 16 orders). Reveals
28+
that voltic and LBR sit at the floor while volfi has a silent ~0.91%
29+
catastrophic-precision tail in the deep wings of the moneyness-vega
30+
plane (3-4% rate per deep-wing band, max σ error 3.3e-1).
31+
- **`bench/wing_grid.rs`** — volfi-style v×Δ wing-saturated stress
32+
harness, 360 cases after filtering. Measures throughput and the NaN set
33+
at the conditioning edge of the inversion problem (81 ns/option, 2
34+
pre-existing NaN — see Known issues).
35+
- **`tests/wing_seed.rs`** (9 tests) — Wren G corner, mpmath-200-bit
36+
reference table at `h ∈ {3..8} × q ∈ {0.01..0.30}`, boundary
37+
finiteness, SIMD lane independence, end-to-end kernel σ recovery at
38+
wing corners, Chebyshev-regime non-regression, context-API routing
39+
through the wing seed, and the `volfi_wing_grid_nan_set_bounded_to_two`
40+
regression pin.
41+
- **`scripts/wing_ref_gen.py`** — regenerates `WING_REF` in
42+
`tests/wing_seed.rs` from mpmath at 200 bits. Not wired to CI; present
43+
for reproducibility.
44+
45+
### Fixed
46+
47+
- **q-convention bug at the wing dispatch site.** The IG kernel's `q` is
48+
the IG CDF; the wing analytic uses IG survival. Fix:
49+
`q_surv = 1 − q_kernel` at the dispatch boundary. Caught during
50+
integration; verifier-confirmed.
51+
52+
### Performance
53+
54+
Schadner cold benchmark (1M synthetic options, znver5, taskset -c 0,
55+
median of 7 timed passes after warmup):
56+
57+
- voltic `implied_vol_fast` one-shot: 73.6 ns / 3.42e-11 max abs σ
58+
error / 0 NaN. Unchanged from v1.0.0 outside the wing regime.
59+
60+
Volfi v×Δ wing-saturated stress grid (360 cases, median of 7):
61+
62+
- voltic `implied_vol_fast`: 81.3 ns / 8.30e-12 / 2 NaN.
63+
- Pre-wing v1.0.0 result on the same grid: 3.27e-1 catastrophic. Net
64+
accuracy win of ~11 orders of magnitude.
65+
66+
Head-to-head against the LBR/volfi/py_vollib_vectorized reference set on
67+
a 100k SplitMix64-seeded subsample (same dataset, znver5, taskset -c 0):
68+
69+
| solver | ns/option | max abs err | NaN | cat (≥ 1e-3) |
70+
|---|---:|---:|---:|---:|
71+
| voltic 1.0.1 `implied_vol_fast` | 73.6 | 3.42e-11 | 0 | 0 |
72+
| py_lets_be_rational (scalar) | 3,475 | 1.54e-11 | 0 | 0 |
73+
| py_vollib_vectorized | 406 | 2.04e-11 | 0 | 0 |
74+
| volfi 0.1.8 `iv_call` | 350 | 3.34e-01 | 1 | 906 |
75+
76+
### Known issues
77+
78+
- voltic carries a mild 2-4× residual to py_lets_be_rational in the
79+
`deep_otm` band (max absolute 9.9e-12 — sub-picovol). Jäckel's
80+
rational guess wins by design in that corner; tightening voltic's
81+
deep_otm seed is v1.1 work.
82+
- Two NaN at `(v=0.01, Δ∈{0.30, 0.70})` on the wing v×Δ stress grid:
83+
tiny-σ near-ATM puts at the f64 BS price floor (< 1e-7), no
84+
meaningful f64 inverse. Pinned by
85+
`tests/wing_seed.rs::volfi_wing_grid_nan_set_bounded_to_two`.
86+
787
## [1.0.0] — 2026-05-31
888

989
A new public API surface for repeat-context workloads and a perf overhaul

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "voltic"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
edition = "2021"
55
build = "build.rs"
66
rust-version = "1.94"

0 commit comments

Comments
 (0)