Crack the Sky
Formula stubs
Future anchors. Derivations live in pricing/, not here.
BSM price / d1 / d2 —
pricing.bsm. Continuous r, q; or F via F = S e^{(r−q)T}.
IV invert —
pricing.iv.implied_vol (European: Newton, then Brent, closed-form vega). pricing.iv.implied_vol_american (Brent on the CRR tree; returns 0.0 at intrinsic). Never NaN.
CRR tree —
pricing.engine.crr_price. American early exercise; risk-neutral p outside [0,1] is an error, not clipped.
Parity forward —
ingest.jobs.forward_from_parity. At the strike minimising |C−P|: F = K + erT(C − P) with a curve (parity), else F = K + C − P (parity-r0). For VIX this is the VX future of that expiry.
Year fraction —
pricing.from_market.year_fraction. ACT/365 to settlement instant.
Vendor unit align — theta × 365 (day → year), vega × 100 (1% → 1.00). Same in
from_market diffs and drift_check.
Raw SVI —
pricing.surface. Gatheral w(k) = a + b(ρ(k−m) + √((k−m)² + σ²)), fit in w0 so w ≥ 0 is a box bound. Butterfly g(k) ≥ 0 and calendar (total variance non-decreasing in T) repaired inside the fit; Surface.vol(K, T) interpolates linearly in total variance.
HAR-RV —
signals.har_rv. Corsi cascade in logs off spy_spot: rv_t = (ln S_t − ln S_{t−1})² (no Roll debias — the Stage 1.1 measurement), regressing log mean(rv_{t+1..t+h}) on [1, log rv_t, log mean(rv_{t−4..t}), log mean(rv_{t−21..t})], expanding walk-forward so the fit at t trains only on targets that ended at or before t. The band is the origin's own in-sample residual sd, read lognormally: rv_daily = exp(μ + σ²/2), vol_ann = √(252 · rv_daily), p10/p90 at μ ∓ 1.2816σ.