--- id: quantlib version: "1.43" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # QuantLib — Python bindings for the QuantLib library License: permissive · Maintenance: active · Downloads: 844.4K/mo ## What it is and what it does QuantLib is a Python wrapper around a mature C++ quantitative finance library. It provides a comprehensive framework for modeling and pricing financial instruments—bonds, options, swaps, and other derivatives—along with tools for portfolio analysis, curve construction, and risk management. The package is designed for financial analysts, researchers, and developers who need production-grade quantitative finance calculations. The library ships with pre-built wheels for modern Python versions and multiple platforms, though installation still carries medium friction due to its compiled nature. A key limitation is that the underlying C++ code is not thread-safe; it maintains global state (notably the evaluation date) that cannot be isolated per-thread in the current wheel implementation. Users should avoid sharing objects across threads and instead give each thread its own set of curves and instruments. Use it for: - Price derivatives (options, swaps, bonds) using standard models like Black-Scholes and Hull-White - Build and manage yield curves for fixed-income analysis and valuation - Perform portfolio risk calculations and scenario analysis across multiple instruments - Develop quantitative trading strategies that require instrument pricing and Greeks computation - Conduct financial research and backtesting with historical or synthetic market data ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. QuantLib provides Python bindings to a C++ library for quantitative finance, offering tools for pricing derivatives, managing portfolios, and modeling financial instruments. Yes, if you work in quantitative finance and need a mature, production-grade pricing and analytics library. The permissive BSD-3-Clause license, active maintenance, and broad platform support make it a solid choice. However, be aware of the threading limitations documented in the description—single-threaded or carefully partitioned multi-threaded designs are required. Verify that the pre-built wheels match your Python version before installing. ## Install pip install quantlib uv add quantlib poetry add quantlib ## Installing QuantLib Before you install: Medium install friction due to compiled wheels; the package is actively maintained with a recent release 31 days ago. Pre-built wheels cover modern Python versions and multiple platforms, reducing build complexity. License in practice: BSD-3-Clause is permissive and places minimal restrictions on use, modification, or distribution. You can use this in commercial projects without copyleft obligations. Quickstart: pip install quantlib import QuantLib as ql # Create a simple date today = ql.Date(15, ql.August, 2026) ql.Settings.instance().evaluationDate = today The underlying C++ library is not thread-safe; globals like evaluation date cannot be set per-thread. Avoid sharing objects and state across threads; each thread should maintain its own set of curves and instruments. Verify before relying: - Whether the package requires a C++ compiler or system libraries beyond the pre-built wheels - Specific Python version support (requires_python field is unspecified) - Performance characteristics for large portfolios or complex derivatives - Availability of comprehensive documentation or examples beyond the homepage ## Package facts - License: BSD-3-Clause (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 844.4K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags quantitative finance library, derivatives pricing python, financial instrument modeling, quantlib python bindings, fixed income analytics, option pricing framework, portfolio risk management, quantitative-finance, derivatives-pricing, fixed-income [View on SkillFed](https://skillfed.io/packages/quantlib) · [View on PyPI](https://pypi.org/project/quantlib/)