skillfed

py-vollib

Deprecated transition package for vollib.

py-vollib v1.0.12 176.8K downloads/30d#10,232 on PyPI424
Permissive license MIT Active released

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-vollib

uv

uv add py-vollib

poetry

poetry add py-vollib

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Office/Business :: Financial

Tags

option pricing black scholesimplied volatility calculationgreeks options derivativesblack model option pricefinancial derivatives pricingvolatility surface computation
quantitative-financederivatives-pricingvolatility-modeling

More Financial packages