Skip to main content

svi-py

CI/CD PyPI Python Downloads codecov Docs License: MIT

Stochastic volatility inspired (SVI) parametrizations of the implied volatility surface in Python — plus the SABR stochastic volatility model.

svi-py calibrates smooth, arbitrage-aware total variance surfaces from panels of European option prices: raw SVI, natural SVI, SSVI, eSSVI, jump-wings, DirectSVI, and SABR behind one interface, with configurable no-arbitrage constraints and a full data-preparation pipeline.

Full documentation: pysvi.readthedocs.io

Installation

pip install svi-py

Requires Python >= 3.13. For JIT-accelerated calibration (togglable at runtime via pysvi.use_numba), install the numba extra:

pip install "svi-py[numba]"

Quick start

You need a DataFrame with columns for strike, implied vol, time to maturity, and implied forward:

from pysvi import get_model, calibrate_slice, apply_slice

# df_slice: single-maturity cross-section with columns
#   strike, iv, maturity, implied_forward
model = get_model("svi")
params = calibrate_slice(df_slice, model)

fitted = apply_slice(df_slice, params, model)
print(fitted[["strike", "iv", "fitted_iv", "residual_iv"]])

The factory accepts "svi", "natural" (or "nsvi"), "ssvi", "essvi", "jumpwings" (or "jw"), "directsvi" (or "dsvi"), and "sabr". Some models take extra per-slice arguments (theta for SSVI/eSSVI, T for jump-wings, T/F/beta for SABR) — see the documentation for each parametrization's formulas, parameters, and usage, plus arbitrage-constraint options and the input-preparation helpers.

Examples

The examples/ directory walks a real SPY option chain (fetched via yfinance) from raw quotes to a priced, verified, serialized surface — five runnable scripts exercising the complete public API, including the no-lookahead snapshot discipline and a survey of implied-vol inversion methods. See the examples guide.

Contributing

Contributions, bug reports, and feature requests are welcome. Open an issue or submit a PR on GitHub. See the contributing guide.

Wanted: the original Gamma-Vanna-Volga paper. The Gamma-Vanna-Volga parametrization is something of a holy grail in the quant vol surface literature and would be a great addition to this library. If you have a copy of the original paper, please send it to marwin.steiner@gmail.com.

License

MIT

Metadata

Release files for svi-py 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svi-py 1.1.0
File Size Uploaded Provenance Actions
svi_py-1.1.0.tar.gz 250.1 kB With provenance Details for svi_py-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for svi-py 1.1.0
File Interpreter ABI Platform Actions
svi_py-1.1.0-py3-none-any.whl Python 3 none any Details for svi_py-1.1.0-py3-none-any.whl

Total release size: 317.1 kB

Release files / svi_py-1.1.0.tar.gz

Download URL svi_py-1.1.0.tar.gz
Size 250.1 kB
Tags Source
SHA-256 checksum
How to use checksums
29df6c1493ed3a4cf6ce5c46b87e4e656f4fb3ef22aad38c8fad5b2ad1a6d9ab
BLAKE2b-256 checksum
How to use checksums
f46d6a6dcb887e109f66d88ee9a666ede55bdbb3e7a26426828fceb0d6dc278b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / svi_py-1.1.0-py3-none-any.whl

Download URL svi_py-1.1.0-py3-none-any.whl
Size 67.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8331421ff2c6bc66517779b952a4d82acd891bba57233ef69bf1e60798ad7131
BLAKE2b-256 checksum
How to use checksums
6d8eb6b0841d0363b6aacebaad1df93e28a27e7cd5cb703ac196157b35ba31c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for svi-py 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for svi_py-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page