Precompiled distributions

Official binary distributions are available for Python and C#; these should be preferred, unless you want to modify the library.

QuantLib for Python

Wheels are available for all common platforms and a few less common ones. To install QuantLib in your (virtual) environment, run:

  pip install QuantLib

and add

  import QuantLib as ql

to your Python code.

QuantLib for C#

An experimental QuantLib package is available from NuGet. It should work on Windows and OS X, but it's not guaranteed to work on all Linux distributions; we'd be grateful for any reports, either of successes or failures. To add QuantLib to your projects, run:

  dotnet add package QuantLib

or use any of the other methods listed on the NuGet page, and add

  using QuantLib;

to your C# code.

QuantLib in C++

There are no official binary packages, but volunteers provide them for a number of platforms. macOS users can use Homebrew or MacPorts. Debian users can find the latest version of the different QuantLib packages in the "unstable" (a.k.a. "Sid") distribution; see the Debian site for a list of available packages. Ubuntu users can use Dirk Eddelbuettel's PPA. Other Linux distributions might also package the library; check your sources. Note that some of these distributions may lag behind the upstream releases.

Source distributions

Official source distributions are available and should be used if a binary distribution is not available for your platform. If you want to modify the library, you should fork our repository on GitHub instead.

Download

Source packages for all platforms are available from GitHub in both zip and tar.gz format for QuantLib and QuantLib-SWIG. Compiling QuantLib requires a working Boost installation; Boost 1.48 or later is required, but a more recent version is suggested. Advanced users may want to configure the library with non-default settings.

Compilation from source

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.