QuantLib Python Bindings
Official stock QuantLib Python bindings made by the project are available on PyPi: https://pypi.org/project/QuantLib/. You can install them simply with:
pip install QuantLib
or with poetry, pipenv or other Python packing tools. The source code is in https://github.com/lballabio/QuantLib-SWIG.
We offer services to extend the Python bindings, optimisation and deployment to various systems including cloud-based environments.
Architecture
The architecture of QuantLib-SWIG Python bindings is shown below. The binding are based on the SWIG system we have experience with since 2002:
Try online
You can try the official Python examples using Jupyter Notebooks on mybinder. Direct links:
- American Option with multiple valuation engines
- Basket options
- Bermudan Swaptions calibrated to market data with multiple models
- Floating and fixed rate bonds
- Callable Fixed Rate Bond
- Caps with Black valuation
- Cashflow analysis of an Overnight Index Swap
- Credit Default Swap
- European Option under Black Scholes and Heston Models
- Swaption priced with 1d Gaussian Models
- Global zero curve fitting
- CDS valued with an ISDA-like engine
Contact
Copyright and published by: BN Algorihtms Ltd 2025. For general information only. Not to be relied for any purpose. Not advice about investment. No warranty of any kind. No liability for any use of this information accepted. Contact: webs@bnikolic.co.uk