--- id: py-lets-be-rational version: "1.1.2" license: MIT license_treatment: permissive maintenance: active --- # py-lets-be-rational — Pure python implementation of Peter Jaeckel's LetsBeRational. License: permissive · Maintenance: active · Downloads: 120.9K/mo ## What it is and what it does py-lets-be-rational is a Python implementation of Peter Jaeckel's LetsBeRational algorithm for computing implied volatility from option prices. It solves the inverse problem of Black's model—given an observed option price, it calculates the volatility that would produce that price—using a highly efficient numerical method. The package provides a pure Python implementation that works out of the box, with an optional Numba dependency for JIT compilation and faster execution. The package depends on numpy for numerical operations and maintains backward compatibility with the historical py_lets_be_rational import path. Installation is straightforward on modern Python (3.9–3.14), though users seeking Numba acceleration must handle OS-specific LLVM setup separately. It is actively maintained and carries a permissive MIT license. Use it for: - Computing implied volatility from observed option market prices for Greeks and risk calculations. - Building implied volatility surfaces across strikes and maturities from option quotes. - Calibrating option pricing models by extracting market-implied volatility parameters. - Backtesting trading strategies that depend on fast, accurate volatility inference. - Constructing volatility indices or term structures for portfolio analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes implied volatility from option prices using Peter Jaeckel's LetsBeRational algorithm, with optional Numba acceleration for speed. Yes. The package solves a well-defined, computationally intensive problem with a proven algorithm. It has low installation friction, active maintenance, MIT licensing, no known vulnerabilities, and broad Python version support (3.9–3.14). The pure Python fallback ensures it works immediately; optional Numba acceleration is available for users willing to handle system-level dependencies. Suitable for production use in option analytics workflows. ## Install pip install py-lets-be-rational uv add py-lets-be-rational poetry add py-lets-be-rational ## Installing py-lets-be-rational Before you install: Low friction installation with a pure Python fallback; the package is actively maintained (last commit 2026-05-29) and supports modern Python versions 3.9–3.14. Optional Numba dependency can improve speed but requires separate system-level LLVM installation, which the documentation acknowledges as OS-dependent. License in practice: MIT license (permissive) allows free use, modification, and distribution with minimal restrictions. The original algorithm carries a historical copyright notice from Peter Jäckel with a simple warranty disclaimer. Quickstart: pip install py-lets-be-rational import numpy # Implied volatility computation via the package's algorithm Optional Numba acceleration requires LLVM 3.9 and llvm-lite installation, which is OS-dependent; pure Python mode works without it but runs slower. Verify before relying: - What functions or classes the package exports for computing implied volatility. - Whether the package's pure Python implementation is sufficiently fast for production use without Numba in typical workflows. - Current status and compatibility of the Numba optional dependency (documentation references numba==0.31.0, which is very old). - What cody-special and piecewise-rational runtime dependencies contribute to the package. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 120.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags implied volatility calculation, option pricing black volatility, lets be rational algorithm, fast implied vol computation, black scholes inverse, option analytics python, quantitative-finance, option-pricing, numerical-methods [View on SkillFed](https://skillfed.io/packages/py-lets-be-rational) · [View on PyPI](https://pypi.org/project/py-lets-be-rational/)