At this time, there's no specific documentation for QuantLib-Python, except for a series of screencasts that I started a while ago (you can find them on YouTube at https://www.youtube.com/playlist?list=PLu_PrO8j6XAvOAlZND9WUPwTHY_GYhJVr) but which is far from exhaustive; there's just a few of them for now, and there's no definite learning path.

However, the structure of the library in Python is the same as in C++, except for some changes (like the use of std::shared_ptr in C++ being hidden in Python) that were made so that one could write more idiomatic Python code. Therefore, you should be able to use the resources listed on the QuantLib site at http://quantlib.org/docs.shtml and translate their advice to the corresponding Python code.

One thing you might run into is that not all of QuantLib is exported to Python. Again, there's no documentation of what's there; so when in doubt, search for a feature inside the SWIG interface files to check if it's exported.

Update: last year, Goutham and I have pooled our material and published the QuantLib Python Cookbook. It's still a work in progress, but it might already be useful.

Further update: as of the end of 2024, A QuantLib Guide is also available.

Answer from Luigi Ballabio on Stack Exchange
🌐
Quantlib
quantlib.org › docs.shtml
QuantLib Documentation
David Duarte provides a reference to the QuantLib-Python module at https://quantlib-python-docs.readthedocs.io/. It's a work in progress: contributions are welcome through pull requests.
🌐
Readthedocs
quantlib-python-docs.readthedocs.io
QuantLib-Python Object Building Documentation — QuantLib-Python Documentation 1.40 documentation
QuantLib-Python Object Building Documentation · View page source · Contents: Getting Started · Installation · Prerequisites · Using a virtual environment (recommended) Install with pip · Conda (alternative) Importing · Reference · Basics · Array · Matrix ·
🌐
Readthedocs
quantlib-python-docs.readthedocs.io › en › latest › basics.html
Basics — QuantLib-Python Documentation 1.40 documentation
Everything starts with “evaluation ... to value a “Swap” as of 09/16/2020, you will first set the evaluationDate in QuantLib. Underhood C++ quant library is packaged using SWIG and python is more a API calling the C++ library....
🌐
Quantlib
quantlib.org › install › windows-python.shtml
QuantLib-Python Installation on Windows
set QL_DIR=C:\local\QuantLib-1.36 set INCLUDE=C:\local\boost_1_86_0 · You'll need to install a few Python modules. It's good practice to install them in a new virtual environment, to avoid possible conflicts with your system Python installation. This also helps in case you have multiple versions of Python on your machine.
🌐
GitHub
github.com › nhaga › QuantLib-Python-Docs › blob › master › docs › basics.rst
QuantLib-Python-Docs/docs/basics.rst at master · nhaga/QuantLib-Python-Docs
Documentation for QuantLib-Python. Contribute to nhaga/QuantLib-Python-Docs development by creating an account on GitHub.
Author   nhaga
Top answer
1 of 5
17

At this time, there's no specific documentation for QuantLib-Python, except for a series of screencasts that I started a while ago (you can find them on YouTube at https://www.youtube.com/playlist?list=PLu_PrO8j6XAvOAlZND9WUPwTHY_GYhJVr) but which is far from exhaustive; there's just a few of them for now, and there's no definite learning path.

However, the structure of the library in Python is the same as in C++, except for some changes (like the use of std::shared_ptr in C++ being hidden in Python) that were made so that one could write more idiomatic Python code. Therefore, you should be able to use the resources listed on the QuantLib site at http://quantlib.org/docs.shtml and translate their advice to the corresponding Python code.

One thing you might run into is that not all of QuantLib is exported to Python. Again, there's no documentation of what's there; so when in doubt, search for a feature inside the SWIG interface files to check if it's exported.

Update: last year, Goutham and I have pooled our material and published the QuantLib Python Cookbook. It's still a work in progress, but it might already be useful.

Further update: as of the end of 2024, A QuantLib Guide is also available.

2 of 5
11

You will find a tutorial of QuantLib using python with simple examples here:

http://gouthamanbalaraman.com/blog/quantlib-python-tutorials-with-examples.html

I have been writing these as a means to be instructive to others going through the process of learning and working with QuantLib. If you have suggestions on what topics you would like to read, please post a comment.

🌐
Leanpub
leanpub.com › quantlibpythoncookbook › read
Read QuantLib Python Cookbook | Leanpub
These are QuantLib constructs that are used throughout the library in creation of instruments, models, term structures etc. ... The Date object can be created using the constructor as Date(day, month, year). It would be worthwhile to pay attention to the fact that day is the first argument, followed by month and then the year. This is different from the Python datetime object instantiation.
🌐
GitHub
github.com › Sweet-and-Fizzy › quantlib-python-docs
GitHub - Sweet-and-Fizzy/quantlib-python-docs: QuantLib Python Documentation · GitHub
This directory contains comprehensive, structured documentation for the QuantLib Python bindings, organized by functional categories.
Author   Sweet-and-Fizzy
Find elsewhere
🌐
PyPI
pypi.org › project › QuantLib
QuantLib · PyPI
pip install QuantLib Copy PIP instructions · Latest version · Released: Apr 17, 2026 · Python bindings for the QuantLib library · These details have been verified by PyPI · lballabio · These details have not been verified by PyPI · Homepage · License: BSD-3-Clause ·
      » pip install QuantLib
    
Published   Apr 17, 2026
Version   1.42.1
🌐
Gouthamanbalaraman
gouthamanbalaraman.com › blog › quantlib-python-tutorials-with-examples.html
QuantLib Python Tutorials With Examples - G B
October 30, 2015 - Short Interest Rate Model Calibration in QuantLib Python: Provides examples of short interest rate model calibration to swaption volatilities in QuantLib Python · Valuing Treasury Futures Using QuantLib Python: Provides an introduction to valuation of treasury futures contract in QuantLib Python.
🌐
GitHub
github.com › nhaga › QuantLib-Python-Docs
GitHub - nhaga/QuantLib-Python-Docs: Documentation for QuantLib-Python · GitHub
Documentation for QuantLib-Python. Contribute to nhaga/QuantLib-Python-Docs development by creating an account on GitHub.
Starred by 117 users
Forked by 42 users
🌐
QuantNet
quantnet.com › forums › 🧠 quant skills & prep › computing
QuantLib Python Documentation | QuantNet
February 5, 2017 - Hi the community! Does somebody know if there is documentation for QuantLib for Python? Thank you a lot!
🌐
PyPI
pypi.org › project › QuantLib-Python
QuantLib-Python · PyPI
Backward-compatible meta-package for the QuantLib module
      » pip install QuantLib-Python
    
Published   Mar 23, 2020
Version   1.18
🌐
GitHub
github.com › lballabio › QuantLib-site › blob › master › docs.shtml
QuantLib-site/docs.shtml at master · lballabio/QuantLib-site
<h1 class="center">Official QuantLib Documentation</h1> <ul> <li>The <strong>QuantLib reference manual</strong> [<a href= "reference/">HTML</a>] is available on this site. </li> </ul> · <h1 class="center">Other information</h1> · <h2 class="center">Reference</h2> <ul> <li>David Duarte provides <strong>a reference to the QuantLib-Python module</strong> at <a href="https://quantlib-python-docs.readthedocs.io/">https://quantlib-python-docs.readthedocs.io/</a>. It's a work in progress: contributions are welcome through pull requests.</li> </ul> ·
Author   lballabio
🌐
Readthedocs
quantlib-python-docs.readthedocs.io › en › latest › mathTools.html
Math Tools — QuantLib-Python Documentation 1.40 documentation
Compared with the “pseudo” random numbers described earlier, another important type of random numbers in random simulations becomes “quasi” random numbers, also known as low-bias sequences. Because of better convergence, quasi-random numbers are often used in the simulation of high-dimensional random variables. There are two types of quasi-random numbers provided by quantlib-python,
🌐
Readthedocs
quantlib-python-docs.readthedocs.io › en › latest › dates.html
Dates and Conventions — QuantLib-Python Documentation 1.40 documentation
where day and year are integers; month can be an integer or a special object reserved in quantlib-python that is specifically used to represent the month (ql.January (equal to 1), …, ql.December(equal to 12))
🌐
Readthedocs
quantlib-python-docs.readthedocs.io › en › latest › getting_started › installation.html
Installation — QuantLib-Python Documentation 1.40 documentation
This page explains the most common ways to install the Python bindings for QuantLib and how to verify the installation.
🌐
Debian
packages.debian.org › sid › quantlib-python
Debian -- Details of package quantlib-python in sid
This package provides Python bindings to parts of the QuantLib library. Tags: System Administration: Virtualization, Software Development: Documentation, Python Development, devel::library, field::finance, Implemented in: Python, Role: role::app-data, role::documentation, Plugin, Shared Library, ...
🌐
Quantlib
quantlib.org › download.shtml
QuantLib Download Page
Compilation instructions are available for Microsoft Visual C++, Mac OS X and Linux/Unix. Alternatively, you can build QuantLib on all platforms following the CMake build instructions. Instructions for creating a Python wheel are available for Windows, Mac OS X and Linux/Unix.