Interface package to make QuantLib pricing library functions available in Excel.
Reason this release was yanked:
Broken build
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantlib_xloil-0.0.1.tar.gz.
File metadata
- Download URL: quantlib_xloil-0.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a12bf91cc2b1a6077893524691f72f46429706bb3e03f820043f79eb69c808d
|
|
| MD5 |
f5d6df6d7c61d72cdaad55739fb590e1
|
|
| BLAKE2b-256 |
3885bf28ef91adb9718177884488d91afe3927575a3d7d43a2a1d78a02018584
|
File details
Details for the file quantlib_xloil-0.0.1-py3-none-any.whl.
File metadata
- Download URL: quantlib_xloil-0.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e25e7d020f0cc350be9562e7d3f7f03b32d523757ab7672f87525edcf92f3247
|
|
| MD5 |
91f60c1bd8154a8ef5b608113f1b1ecb
|
|
| BLAKE2b-256 |
f762e2d69c2ef3dee64572e7bec275ae931b6f83eec97f1c2b3e7deed005cfef
|