# QuantLib

The open-source derivatives pricing library banks actually use, reachable from Python.

*https://stockmarketstack.com/tools/quantlib · Market Analysis & Portfolio Optimization Libraries*

## Facts

### At a glance

| Field | Value |
| --- | --- |
| Vendor | QuantLib |
| Category | Market Analysis & Portfolio Optimization Libraries |
| Job | quant_models |
| Website | https://www.quantlib.org |
| Pricing model | open-source |
| Free tier | true |
| Open source | true |
| Licence | BSD-3-Clause |
| Self-hosted | true |
| Tested hands-on | false |
| Last updated | 2026-09-19 |

### Coverage

| Field | Value |
| --- | --- |
| Asset classes | stocks, options, bonds, futures, forex, indices |
| Markets | global |
| Works outside the US | true |
| Data latency | none |
| Platforms | library |
| AI features | none |

### Interfaces

| Field | Value |
| --- | --- |
| API | false |
| Webhooks | false |
| Scripting | C++ |
| Python | true |
| Spreadsheet add-in | false |
| MCP server | false |
| Export | none |

### Capabilities

Yes: options_analysis

No: charting, screening, scanning, backtesting, automation, live_trading, paper_trading, portfolio_tracking, broker_import, tax_reporting, alerts, news

*Verified: pricing 2026-09-19; capabilities 2026-09-19; coverage 2026-09-19.*

## What it is

QuantLib is the library a quant reaches for when the thing being priced is not a stock. Twenty-six
years of C++ covering day-count conventions, business-day calendars, yield-curve bootstrapping,
cash-flow schedules, bonds, swaps, swaptions, caps and floors, credit default swaps, inflation
products, and equity and FX options with analytic, binomial, finite-difference and Monte Carlo
engines behind them. The stochastic processes — Heston, Bates, Hull-White, G2++, the Libor market
model — are in there as first-class objects, not as example code.

The parts that get used most are the boring ones. `ql/time/calendars` in 1.43 holds 47 national
holiday calendars — Argentina through Uzbekistan — plus the eurozone TARGET calendar and the
machinery for combining or overriding them, which is the difference between a swap that settles on
the right day and one that does not.

Python users reach it through **QuantLib-SWIG**, a sibling repository that generates Python, C#,
Java and R bindings from the C++ headers. It is the same product: same version number, same
licence, same release day. What you type is `pip install QuantLib` and `import QuantLib as ql`,
and the API you get is the C++ API with Python syntax — `ql.Date(15, 6, 2026)`, `ql.Actual360()`,
`ql.BlackScholesMertonProcess(...)`.

**Repository state on 19 September 2026.** QuantLib 1.43 was released on 14 July 2026, following
1.42 in April, 1.41 in January and 1.40 in October 2025 — a quarterly cadence that has held for
years. The last commit to `master` landed on 18 September 2026 and there were 26 open issues;
QuantLib-SWIG was last committed to on 17 September 2026 with 5 open issues. Neither repository is
archived. Luigi Ballabio leads the project, releases are cut by CI, and the copyright block in
LICENSE.TXT names hundreds of contributors, with new names added in 2026.

## Pricing

Free, BSD 3-Clause, and nothing whatsoever is for sale — no enterprise build, no support contract
sold by the project, no data bundle. The licence imposes the standard attribution and
no-endorsement conditions and is not copyleft, which is why the library turns up inside commercial
risk systems.

The one thing that costs money is the documentation, and only optionally: the *QuantLib Python
Cookbook* by Luigi Ballabio and Goutham Balaraman is on Leanpub at a minimum price of free and a
suggested price of $29.99, last updated 10 July 2026.

## Data & coverage

No market data. QuantLib takes quotes, curves and term structures that you build from your own
source and knows nothing about where they came from. Its coverage is *conventions*, not prices:
calendars, day counts, index definitions and settlement rules for markets worldwide.

## Limitations

- The learning curve is the real cost. QuantLib models the financial-engineering domain faithfully
  and expects you to know it — handles, observers, term-structure hierarchies and engine injection
  are all visible in the API, and none of that can be shortcut.
- The Python bindings have no reference documentation of their own. The Doxygen C++ reference is
  the manual, and reading it means reading C++ signatures; the cookbook and a third-party
  ReadTheDocs site fill the gap unofficially.
- The API moves. Features deprecated in 1.38 were removed in 1.43, and 1.43 deprecated another
  batch for removal around 1.48. Pinning a version is normal practice here.
- Not a backtester and not a risk system. There is no portfolio object, no P&L attribution and no
  scenario engine — those are things people build *on* QuantLib.
- PyPI ships wheels only, with no source distribution, so an unusual platform means a full C++
  build.

## Alternatives

Nothing open source covers the same ground. For the narrow slice of volatility modelling,
[arch](https://stockmarketstack.com/tools/arch) is a far smaller dependency; for options analytics inside a product rather than
a library, see the [charting and screening platforms](https://stockmarketstack.com/categories/charting-screeners). The
realistic alternative to QuantLib is a commercial analytics library with a sales process attached.

## FAQ

### What do I pip install to get QuantLib in Python?

`pip install QuantLib`, then `import QuantLib as ql`. Do not install the project called QuantLib-Python — it is a backward-compatible meta-package frozen at version 1.18 from March 2020, kept only so old requirements files keep resolving.

### Do I need to build the C++ library first?

Not for Python. The QuantLib project on PyPI ships 26 self-contained wheels per release, using the stable ABI from CPython 3.9 upward plus free-threaded 3.14 and PyPy 3.11, covering manylinux and musl on x86_64, aarch64 and i686, macOS Intel and Apple Silicon, and 32- and 64-bit Windows. There is no sdist, so an unmatched platform means building from the GitHub sources.

### Is QuantLib still maintained?

Yes, on a quarterly clock that has not slipped. Version 1.43 shipped on 14 July 2026 and the four before it landed in July and October 2025 and January and April 2026. The last commit to master was 18 September 2026, there were 26 open issues on that date, and the repository is not archived.

### Are the Python bindings a separate project?

They are a separate repository, QuantLib-SWIG, but not a separate product. SWIG generates the Python, C#, Java and R bindings mechanically from the C++ headers, they carry the same version number, the same BSD 3-Clause licence, and they are released on the same day by the same maintainers.

## Also worth comparing

- [arch](https://stockmarketstack.com/tools/arch.md) — GARCH and the rest of the volatility-model family, plus the tests you need around them.
- [exchange_calendars](https://stockmarketstack.com/tools/exchange-calendars.md) — Sessions, minutes and holidays for 69 exchanges, keyed by ISO-10383 code.
- [pandas-ta](https://stockmarketstack.com/tools/pandas-ta.md) — The DataFrame indicator library whose repo is gone and whose last release is a year old.
- [PyPortfolioOpt](https://stockmarketstack.com/tools/pyportfolioopt.md) — Prices in, weights out — efficient frontier, Black-Litterman and HRP.
- [Riskfolio-Lib](https://stockmarketstack.com/tools/riskfolio-lib.md) — Twenty-six convex risk measures, four objectives, one cvxpy-backed optimiser.
- [skfolio](https://stockmarketstack.com/tools/skfolio.md) — Portfolio optimisation as scikit-learn estimators — fit, predict, cross-validate.
