Skip to main content

Interface package to make QuantLib pricing library functions available in Excel.

Reason this release was yanked:

Broken dependency

Project description

QuantLibXlOil

QuantLibXlOil is an interface package to make functions of the open-source QuantLib pricing library available in Excel.

The interface builds on the Python bindings for QuantLib via QuantLib-SWIG.

We use xlOil to make the QuantLib Python objects and functions available in Excel.

The QuantLibXlOil package largely contains wrapper functions in Python which delegate calls to QuantLib constructors and method/function call. The wrapper functions are made available to Excel via xlOil's function decorator. In addition, the package provides converter functions between Excel data types and QuantLib types.

Why Another QuantLib Interface?

Excel is widely adapted in the industry as calculation tool and GUI for a large variety of use cases.

QuantLib has the classical QuantLibXL interface for Excel. However, QuantLibXL was last updated for QuantLib v1.22 (April 2021). The QuantLibXL object and interface specification is quite complex and closely linked to QuantLib internals. This makes maintenance quite challenging.

The QuantLib Python interface is probably the best QuantLib interface in terms of coverage and maintenance. With the QuantLibXlOil package, we aim at leveraging the matured QuantLib Python interface.

As an additional objective, we want to disentangle QuantLib developments from Excel interface development. This is particularly relevant for QuantLib C++ internals. For example, switching from boost::something to std::something should not affect the Excel interface. This motivates building on top of an existing high-level language interface.

Linking between Python and Excel is a well understood task. There are several tools that implement that bridge. We opt for xlOil because it is open-source and works well for the use cases tested.

Getting Started

The manual way...

Setup Python Environment

Set up a Python environment via conda or pip and with the following packages:

  • quanlib-python,
  • numpy,
  • pandas (Version 2).

Install xlOil

xlOil is available via pip and pip install xloil.

Install the xlOil Excel add-in by running xloil install from the command line of the Python environment.

Open Excel and create a new Workbook. The xlOil Py add-in should appear as a new ribbon.

Navigate to the xlOil Py ribbon and select the Python environment with xloil package installed in the Environment drop-down menu.

Run =xloVersion() in a Workbook cell. This should output version and build date details in the Excel cells.

Details on getting started with xlOil are documented here.

Install QuantLibXlOil

Clone the QuantLibXlOil repository.

Add the complete path to C:\...\QuantLibXlOil\src\ in the Search Path tet field.

Add quantlib_xloil to the Load Modules text field. Use comma separator and no blanks. The resulting input of the Load Modules text field should then be:

xloil.xloil_ribbon,quantlib_xloil

Restart Excel and open a blank Workbook.

Now, the QuantLibXlOil functions should be available in Excel.

Test the QuantLibXlOil functions by typing =qlVersion() in an empty cell. This should give the QuantLib version number.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantlib_xloil-0.0.2.tar.gz (170.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantlib_xloil-0.0.2-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file quantlib_xloil-0.0.2.tar.gz.

File metadata

  • Download URL: quantlib_xloil-0.0.2.tar.gz
  • Upload date:
  • Size: 170.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for quantlib_xloil-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c57cd65fa0c74994c008a3976c995f42f475aef1115377129068b6ee7c18caee
MD5 609548027e6b3874e58e7ab88af64799
BLAKE2b-256 30cfb9c4fa283e3a825ce6366a6039996730d96c43274ee996a31192a0061ce0

See more details on using hashes here.

File details

Details for the file quantlib_xloil-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: quantlib_xloil-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for quantlib_xloil-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 275250047e288d2fd3a9a23f02c5e46360c01b85096231922c48ae90e37f8a08
MD5 b5626bfd64c0ce07c4d2adb4293b6869
BLAKE2b-256 68d7801cd9d13c3d597cd62d6fd6d33aa7064382fb27a10b8dc0f60074083a1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page