py-vollib
Deprecated transition package for vollib.
What it is and what it does
py_vollib is a deprecated transition package that provides Python bindings for option pricing and volatility calculations. It wraps Peter Jaeckel's LetsBeRational algorithm to compute implied volatility from option prices with high speed and precision, and offers functions to calculate option prices and Greeks (delta, gamma, vega, theta, rho) under three classical models: Black, Black-Scholes, and Black-Scholes-Merton. Both analytical and numerical Greeks are available.
The package is now a compatibility layer; the canonical package is `vollib`. Existing code importing from `py_vollib` will continue to work, but new code should migrate to `vollib` directly. It depends on numpy, pandas, scipy, and specialized libraries for error functions and rational interpolation. Strike prices must be strictly positive or the functions will raise errors.
Use it for:
- Calculate implied volatility from observed option market prices for volatility surface construction
- Price European options under Black-Scholes or Black-Scholes-Merton models for portfolio valuation
- Compute Greeks (delta, gamma, vega, theta, rho) for risk management and hedging strategies
- Validate option pricing models by comparing analytical and numerical Greeks implementations
- Build derivatives analytics pipelines that require fast, accurate volatility and price calculations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Calculates option prices, implied volatility, and Greeks using Black, Black-Scholes, and Black-Scholes-Merton models, built on Peter Jaeckel's LetsBeRational algorithm for fast implied volatility computation.
Yes, but with a strong caveat: this package is deprecated and exists only as a transition bridge. If you are starting a new project, install and import from the canonical `vollib` package instead. If you have existing code pinned to py_vollib, it will continue to work (low friction, active maintenance, no known vulnerabilities), but plan a migration. The underlying algorithms are solid and widely used in quantitative finance.
Install
py-vollib on PyPI
pip
pip install py-vollibuv
uv add py-vollibpoetry
poetry add py-vollibInstalling py-vollib
Before you install
Low install friction; pure Python wheel with no compiled dependencies. Active maintenance as of 2026-05-29, supporting Python 3.9 through 3.13. Note: this is a deprecated transition package; new code should import from the canonical `vollib` package instead.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions. No notable licensing constraints for typical use.
Quickstart
pip install py-vollib
from vollib.black_scholes import black_scholes
from vollib.black_scholes.implied_volatility import implied_volatility
price = black_scholes('c', S=100, K=100, t=0.5, r=0.01, sigma=0.2)
iv = implied_volatility(price, S=100, K=100, t=0.5, r=0.01, flag='c')
Strike prices must be strictly positive; K=0 or K<0 will raise ZeroDivisionError or ValueError respectively.
Verify before relying
- Whether the deprecated py_vollib package will continue to receive security updates or if migration to vollib is urgent
- Performance characteristics and accuracy of numerical vs. analytical Greeks implementations
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — vollib |
| Maintenance | actively maintained — 74 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 176,846/month — #10,232 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_vollib-1.0.12-py3-none-any.whl
Tags
More Financial packages
statsmodels provides statistical models,…
permissive · top 1,000 on PyPI
yfinanceFetches financial and market data from Yahoo…
permissive · top 1,000 on PyPI
bokehBokeh is an interactive visualization library…
permissive · top 5,000 on PyPI
python-stdnumParses, validates, and reformats standard…
copyleft · top 5,000 on PyPI
panelPanel is a Python framework for building…
permissive · top 5,000 on PyPI
databentoOfficial Python client for accessing live and…
permissive · top 5,000 on PyPI
vollibvollib calculates option prices, implied…
permissive · top 15,000 on PyPI
py-lets-be-rationalComputes implied volatility from option prices…
permissive · top 15,000 on PyPI
volatility3Volatility 3 is a memory forensics framework…
unclear · top 15,000 on PyPI
pyportfoliooptPyPortfolioOpt implements portfolio…
permissive · top 15,000 on PyPI
taComputes technical analysis indicators (volume,…
permissive · top 5,000 on PyPI
cody-specialProvides high-precision implementations of…
permissive · top 15,000 on PyPI
QuantLibQuantLib provides Python bindings to a C++…
permissive · top 5,000 on PyPI
piecewise-rationalPerforms shape-preserving piecewise rational…
permissive · top 15,000 on PyPI
linearmodelsProvides panel regression, instrumental…
unclear · top 15,000 on PyPI
numpy-financialProvides elementary financial functions (IRR,…
permissive · top 5,000 on PyPI