🌐
Quantlib
quantlib.org › docs.shtml
QuantLib Documentation
Goutham Balaraman and Luigi Ballabio, QuantLib Python Cookbook Available as an ebook from Leanpub.
🌐
Leanpub
leanpub.com › quantlibpythoncookbook
QuantLib Python Cookbook [Leanpub PDF/iPad/Kindle]
Quantitative finance in Python: a hands-on, interactive look at the QuantLib library through the use of Jupyter notebooks as working examples.
🌐
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 ·
🌐
Leanpub
samples.leanpub.com › quantlibpythoncookbook-sample.pdf pdf
QuantLib Python Cookbook
July 16, 2025 - To begin, we import the QuantLib module and set up the global evaluation date. ... As a sample instrument, we’ll take a textbook example: a European option.
🌐
Leanpub
leanpub.com › quantlibpythoncookbook › read
Read QuantLib Python Cookbook | Leanpub
In this post, we will use QuantLib and the Python extension to illustrate a simple example. Here we are going to price a European option using the Black-Scholes-Merton formula.
🌐
Implementingquantlib
implementingquantlib.com › p › tutorials.html
Tutorials and Examples — Implementing QuantLib
In this series of screencasts, I go through a number of Jupyter notebooks (still called IPython notebooks at that time) that were eventually published in the QuantLib Python Cookbook.
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.

🌐
Quantlib
quantlib.org › install › windows-python.shtml
QuantLib-Python Installation on Windows
You should download the same version as the version of QuantLib you installed; for the sake of example, I'll use version 1.36 which is the most recent version at the time of this writing. Once you have the zip file, extract it by executing · tar xzf QuantLib-SWIG-1.36.tar.gz This creates a folder QuantLib-SWIG-1.36; enter its Python subfolder and build the QuantLib wrappers by executing:
Find elsewhere
🌐
Gouthamanbalaraman
gouthamanbalaraman.com › blog › quantlib-python-tutorials-with-examples.html
QuantLib Python Tutorials With Examples - G B
October 30, 2015 - Valuing Convertible Bonds Using QuantLib Python: Provides an introduction to valuation of convertible bonds using QuantLib Python with a minimal example.
🌐
EBIN.PUB
ebin.pub › quantlib-python-cookbook-k-3399939.html
QuantLib Python Cookbook - EBIN.PUB
The Python Cookbook is a collection of problems, solutions, and practical examples for Python programmers, written by Py ... Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up · QuantLib Python Cookbook Luigi Ballabio and Goutham Balaraman ...
🌐
Jrvarma
jrvarma.in › papers › 2015-08-09-CiSE-Computational-Finance-QuantLib-Python-Accepted-Version.pdf pdf
Computational Finance Using QuantLib-Python c ⃝2016 IEEE Jayanth R. Varma
QuantLib, built in C++ and also available in Python, Ruby, R and Excel among others. This note introduces QuantLib for computational finance applications in teaching and · research, along with a ‘worked-out’ example.
🌐
Implementingquantlib
implementingquantlib.com › p › the-book.html
My books — Implementing QuantLib
However, you might want to check out the QuantLib Python Cookbook instead. The material from Implementing QuantLib was originally featured as blog posts, now somewhat outdated with respect to the published book but still collected on this page. This book, available from Leanpub, collects updated posts from Goutham Balaraman’s blog and the extended transcripts of a series of screencasts that I published on YouTube. The posts and screencasts use Jupyter notebooks as working examples ...
🌐
Implementingquantlib
implementingquantlib.com › 2024 › 03 › using-quantlib-interactively.html
Using QuantLib interactively — Implementing QuantLib
March 21, 2024 - Go to the QuantLib-SWIG repository on GitHub (the home of the Python, Java, C# and R wrappers for QuantLib) and under the list of files you’ll see a README file, with a row of colorful badges displayed after the title. Click on the one that says “launch binder”, wait until the environment is built (it might take a while; the binder project has limited funds and resources and is looking for sponsors) and you’ll find yourself connected to a running Jupyter instance with a number of QuantLib examples that you can run and modify.
🌐
GitHub
github.com › xuruilong100 › QuantLibPythonExamples
GitHub - xuruilong100/QuantLibPythonExamples: Reimplementing QuantLib examples by Python
Reimplementing QuantLib examples by Python. Contribute to xuruilong100/QuantLibPythonExamples development by creating an account on GitHub.
Starred by 66 users
Forked by 21 users
Languages   Python 70.9% | SWIG 27.3% | C++ 1.8% | Python 70.9% | SWIG 27.3% | C++ 1.8%
🌐
VDOC.PUB
vdoc.pub › documents › quantlib-python-cookbook-42ojscs21rf0
Quantlib Python Cookbook [PDF] [42ojscs21rf0]
In [1]: %�pture %pylab inline --no-import-all import matplotlib.pyplot as plot import utils utils.set_default_plot_size() In [2]: from QuantLib import * In [3]: today = Date(17, October, 2016) Settings.instance().evaluationDate = today Setting the stage For illustration purposes, I’ll create a bond curve using the same data and algorithm shown in one of the QuantLib C++ examples; namely, I’ll give to the curve the functional form defined by the Nelson-Siegel model and I’ll fit it to a number of bond.
🌐
GitHub
github.com › lballabio › QuantLib-site › blob › master › docs.shtml
QuantLib-site/docs.shtml at master · lballabio/QuantLib-site
<strong>The Python Lab</strong> <a href="https://thepythonlab.com/tag/quantlib/">blog</a> (in Spanish).<br> <strong>Quant College</strong> <a href="https://quantcollege.net/tag/quantlib">blog</a> (in Japanese).<br> <strong>Xu Ruilong's</strong> <a href="https://xuruilong100.github.io/tags/quantlib/">blog</a> (in Chinese) and the associated <a href="https://github.com/xuruilong100/QuantLibPythonExamples">code examples</a>.<br>
Author   lballabio
🌐
Snyk
snyk.io › advisor › quantlib › quantlib code examples
Top 5 QuantLib Code Examples | Snyk
enthought / pyql / examples / test_process.py View on Github · from quantlib.termstructures.yields.zero_curve import ZeroCurve def flat_rate(forward, daycounter): return FlatForward( quote = SimpleQuote(forward), settlement_days = 0, calendar = NullCalendar(), daycounter = daycounter ) DtSettlement = today() settings = Settings() settings.evaluation_date = DtSettlement daycounter = ActualActual() calendar = NullCalendar() iRate = .1 iDiv = .04 risk_free_ts = flat_rate(iRate, daycounter) dividend_ts = flat_rate(iDiv, daycounter) s0 = SimpleQuote(32.0) # Bates model v0 = 0.05 kappa = 5.0; theta = 0.05; sigma = 1.0e-4;