VolFoundry volatility infrastructure
connecting… GitHub

open-source volatility infrastructure

Live option chains, turned into arbitrage-checked vol surfaces.

VolFoundry inverts live Deribit quotes through Black-76, extracts a forward per expiry, fits raw-SVI smiles and a global SSVI surface, then reports static-arbitrage diagnostics with their evaluation domain and tolerance. Everything below this line is running on live market data, in this browser tab — no server, no replay.

Deribit WS→ quote validation→ forward extraction→ Black-76 IV→ raw SVI→ global SSVI→ static-arb checks
market surface · interpolated

Implied volatility surface

building surface from the live chain…
σ low → high drag to orbit · each expiry is drawn only across the strikes it quotes, trimmed to ±4 ATM standard deviations σ-moneyness puts every maturity on the same footing: \(z=k/(\sigma_{\mathrm{ATM}}\sqrt{T})\)
slice · live

Smile — implied vol vs strike

waiting for the first chain snapshot…
term structure · live

ATM vol by maturity

waiting for the first chain snapshot…
ATM read off each fitted slice at \(k=0\) — the \(\theta(T)\) that SSVI ties the surface to.

Methodology

Pricing, calibration & no-arbitrage validation

The pipeline that turns a raw quote into a validated surface, with each step tied to its source in the literature and to where it runs in the code. Conventions: volatility is decimal (0.60 = 60%), maturity \(T\) is in years on ACT/365, log-moneyness is \(k=\ln(K/F)\), and total variance is \(w(k,T)=\sigma^2(k,T)\,T\). Full derivations are in the repository under docs/derivations/; numbered references are listed below.

01 · PRICING

Forward-settled European options [1]

\[ C = e^{-rT}\big[F\,\Phi(d_1)-K\,\Phi(d_2)\big],\qquad d_{1,2}=\frac{\ln(F/K)\pm\tfrac12\sigma^2T}{\sigma\sqrt{T}} \]

Black's forward measure [1]: crypto options settle against a future, so the forward — not spot — is the state variable. In VolFoundry: pricers.black76_price evaluates this; iv.implied_volatility inverts it for \(\sigma\) by Newton on vega with a bracketed (Brent) fallback, holding the root in \(\sigma\in(0,5]\).

02 · FORWARD

Forward curve from put–call parity

\[ C(K)-P(K)=e^{-rT}\,(F-K) \]

A model-free identity. Regressing \(C-P\) on \(K\) across paired strikes yields slope \(-e^{-rT}\), hence the discount factor and forward, per expiry — no constant-rate or zero-basis assumption. In VolFoundry: SurfaceBuilder runs this regression; the live panels above use Deribit's per-expiry underlying_price as \(F\).

03 · SMILE

SVI slice parameterisation [3][6]

\[ w(k)=a+b\Big(\rho\,(k-m)+\sqrt{(k-m)^2+\sigma^2}\Big) \]

Gatheral's stochastic-volatility-inspired form [3]; its wing slopes \(b(1\pm\rho)\) obey Lee's moment bound \(\le 2\) [5]. In VolFoundry: svi.calibrate_svi_slice uses the Zeliade quasi-explicit scheme [6] — outer search over \((m,\sigma)\), inner constrained least-squares for \((a,b,\rho)\).

04 · BUTTERFLY

Butterfly arbitrage: the \(g(k)\) condition [4]

\[ g(k)=\Big(1-\frac{k\,w'(k)}{2w(k)}\Big)^{2} -\frac{w'(k)^2}{4}\Big(\frac{1}{w(k)}+\frac14\Big)+\frac{w''(k)}{2}\;\ge\;0 \]

Non-negative risk-neutral density in Gatheral–Jacquier form [4], cross-checked against the Breeden–Litzenberger density \(\partial^2C/\partial K^2\ge 0\) [2]. In VolFoundry: arbitrage evaluates \(g(k)\) over a stated domain (e.g. \(k\in[-2,2]\), 1001 pts) at a reported tolerance — evidence over that grid, not a proof over the whole real line.

05 · CALENDAR

Calendar arbitrage & the SSVI surface [4]

\[ \partial_T\,w(k,T)\ge 0,\qquad w(k,\theta)=\frac{\theta}{2}\Big(1+\rho\varphi(\theta)k+\sqrt{(\varphi(\theta)k+\rho)^2+1-\rho^2}\Big) \]

SSVI couples the slices through ATM total variance \(\theta(T)\) and a \(\varphi(\theta)\) family; Gatheral–Jacquier give the parameter conditions for a calendar- and butterfly-free surface [4]. In VolFoundry: strict validation enforces these during calibration and rejects violating fits, rather than auditing after the fact.

06 · FILTERING

Quote filtering & no-arbitrage bounds

\[ \text{keep } q:\;\; b>0,\;\; a>b,\;\; \tau > \tau_{\min},\;\; \max(F-K,0)e^{-rT} \le C \le Fe^{-rT} \]

Zero-bid, crossed and stale quotes, sub-day maturities and prices outside the static no-arbitrage bounds are removed before inversion. In VolFoundry: the data layer records per-reason drop counts so the surface is auditable — a fit is only as sound as the quotes beneath it.

References

  1. Black, F. (1976). The pricing of commodity contracts. Journal of Financial Economics, 3(1–2), 167–179. doi:10.1016/0304-405X(76)90024-6
  2. Breeden, D. T., & Litzenberger, R. H. (1978). Prices of state-contingent claims implicit in option prices. The Journal of Business, 51(4), 621–651. doi:10.1086/296025
  3. Gatheral, J. (2004). A parsimonious arbitrage-free implied volatility parameterization. Global Derivatives & Risk Management, Madrid; see also The Volatility Surface (Wiley, 2006).
  4. Gatheral, J., & Jacquier, A. (2014). Arbitrage-free SVI volatility surfaces. Quantitative Finance, 14(1), 59–71. arXiv:1204.0646
  5. Lee, R. W. (2004). The moment formula for implied volatility at extreme strikes. Mathematical Finance, 14(3), 469–480. doi:10.1111/j.0960-1627.2004.00200.x
  6. Zeliade Systems (2009). Quasi-explicit calibration of Gatheral's SVI model. Zeliade White Paper ZWP-0005.

Use it as a library

Pure Python, typed, tested against analytic cases and reference surfaces. Same code path the panels on this page are modelled on.

shell
# install
$ pip install volfoundry

# live chain → calibrated, validated surface
$ volfoundry live --currency BTC --out surface.json

# or from Python
>>> from volfoundry import Chain, SSVISurface
>>> chain   = Chain.from_deribit("BTC")
>>> surface = SSVISurface.calibrate(chain)
>>> surface.validate(domain=(-2, 2), n=1001).is_valid
True
>>> surface.iv(k=0.0, T=30/365)
0.5812
  • 01Quotes in, surface outDeribit live or historical chains, quote hygiene and forward extraction included — not just a curve fitter.
  • 02Diagnostics you can quoteButterfly, calendar and density checks returned as data: domain, grid size, tolerance, per-slice minima and rejects.
  • 03Deterministic and typedSeeded optimisers, pinned tolerances, full type hints, property tests on the SVI parameter constraints.
  • 04MIT licensedRead it, fork it, vendor it. Issues and PRs at the repository.
Notice Research and educational open-source software — not investment advice and not a trading recommendation. Market data is fetched directly from a public exchange endpoint and comes with no warranty of completeness, accuracy or timeliness; the surface shown here is an interpolation of exchange mark_iv, not an executable price. Numerical no-arbitrage checks are reported together with their evaluation domain, grid and tolerance and are not a guarantee of arbitrage-freeness over all strikes and maturities. Validate independently before any financial use.