Open-source numerical library

Volatility surfaces that tell you when they lie.

fast-vollib prices options, inverts implied volatility with Jäckel's solver, calibrates whole surfaces with SVI, SSVI, splines and Heston — and reports the arbitrage each fit leaves behind, instead of hiding it. NumPy, PyTorch and JAX backends, CPU or GPU, one API.

pip install fast-vollib

Option Greeks vs time

S = 100r = 5%call
time to expiry 1.0000 y

Watch gamma spike and vega collapse at the money as T → 0, while delta hardens into a step. Curves are computed live in your browser and agree with fast-vollib to (measuring…) over a 1,260-point grid.

01 · Real data

One quarter, 62 surfaces, three-fold volatility.

Across Q2 2025 the SPX 30-day at-the-money implied volatility moved by a factor of three. Drag the scrubber to walk through the quarter; drag the surface itself, or use the arrow keys, to rotate it.

SVI fit · shared 25 × 8 grid

At-the-money term structure

ATM implied volatility against maturity for the selected date

30-day ATM through the quarter

30-day at-the-money implied volatility for every trading day of Q2 2025

Accessible description and data

Download the time-lapse JSON — fitted surfaces on a coarse grid, no raw quotes.

02 · Calibrators

Five algorithms, one grid, one honest trade-off.

The same observations, fitted five ways and materialised on the same moneyness × maturity grid. The non-parametric spline fits closest and violates the most; SSVI and Heston are arbitrage-free by construction and pay for it in fit error; and a learned three-factor basis fits a whole surface in about a millisecond but only where its training data reached. This is the trade-off the library exists to make measurable.

Smile at the selected date

Implied volatility against log-moneyness for each maturity, all four algorithms

Whole-quarter scorecard

Medians over the 62 trading days of Q2 2025. “Arb-free days” counts days where fast-vollib’s grid diagnostics found no butterfly, calendar or vertical-spread violation.
Algorithm Median RMSE Median fit Arb-free days Mean violations Butterfly Calendar

What each calibrator actually does

03 · Diagnostics

Where the surface stops being a probability.

A surface is butterfly-free exactly when Durrleman's g(k) ≥ 0, which is the same as saying the implied risk-neutral density is non-negative. Below, both are computed by fast-vollib on the fitted grid for a calm day and the tariff-shock peak. Cells marked × are genuine violations.

Durrleman g(k) on the fitted grid

Heatmap of Durrleman's g across maturity and log-moneyness; negative cells are butterfly violations

Rows are maturities, columns log-moneyness. Red with means g < 0 — a butterfly-arbitrage violation.

Implied risk-neutral density

Breeden-Litzenberger risk-neutral density by strike for several maturities

Breeden–Litzenberger density f(K) = ∂²c̃/∂K². Any excursion below zero is not a probability density.

AlgorithmRMSE vs quotes min g(k)min density ViolationsVerdict

04 · Fit quality

Fitted against the market it came from.

Implied volatilities re-solved from mid quotes with fast-vollib, binned to a coarse moneyness grid (each point is the mean of at least three quotes), against the fitted smiles. Points are market; lines are model.

Binned market implied volatility points with fitted smile curves by maturity bucket

At-the-money term structure

At-the-money implied volatility against maturity for the selected day

Calm days slope gently upward; a shock inverts the curve, because the fear is immediate.

Skew: σ(k = −0.10) − σ(k = +0.10)

Put-minus-call implied volatility skew against maturity for the selected day

How much more the market pays for a 10% downside strike than a 10% upside one, at each maturity.

How the market points were produced

05 · Interactive

Move the inputs, watch the Greeks.

Black–Scholes computed in your browser, so it responds instantly. The implementation is diffed against fast-vollib on every build — the measured maximum error is in the table below.

Selected option quantity against spot price

Browser vs fast-vollib

Maximum absolute difference over a fixed 1,260-point grid spanning S ∈ [60, 150], K ∈ [80, 120], T ∈ [0.02, 2] y, r ∈ [0, 5%], σ ∈ [10%, 60%]. Measured at build time by scripts/verify_js.mjs, not asserted.
QuantityCall · max abs errorPut · max abs error

06 · Simulation

Paths, and where they end up.

20,000 paths per process from fast-vollib's simulation engine — geometric Brownian motion and Heston stochastic volatility — over six months. Heston's terminal distribution carries the fatter left tail that a single volatility number cannot express.

Sample paths

Twenty-four sample simulated price paths over six months starting at 100

Terminal distribution

Histogram of terminal prices from twenty thousand simulated paths

07 · Benchmarks

Measured here, on stated hardware.

Loading hardware description…

Throughput in options per second against problem size for each backend
Backenddtype10⁴10⁵10⁶10⁷

08 · Stay in the loop

Get market-structure notes.

Occasional notes on volatility surfaces, calibration and the library's development. No spam; unsubscribe any time.