Skip to content
All library documents

Options for Connecting QuantLib Derivatives Pricing to Excel

Article Quant Q&A · Author: Lisa Ann

Summary

The document surveys ways to use QuantLib-backed analytics from Excel, motivated by spreadsheet workflows that combine pricing with data from market terminals. The options named include QuantLibXL, RExcel with RQuantLib, PyXLL with QuantLib-Python, a commercial wizard-based add-in, and xlOil binding Python to Excel.

The post offers trade-offs rather than a systematic comparison. The questioner finds QuantLibXL difficult and prefers the R route, while a later answer presents xlOil as an open-source way to reuse Python QuantLib objects in Excel and interoperate with other Python libraries. Another answer recommends a commercial add-in, with the disclosure that its author created the package. No benchmarks, deployment details, or independent reliability comparisons are supplied, and the tools listed may differ in maintenance and availability.

Key ideas

  • QuantLib can be exposed to Excel through native add-ins or by connecting Excel to R or Python.
  • QuantLibXL, RExcel with RQuantLib, and PyXLL with QuantLib-Python are among the approaches discussed.
  • xlOil is presented as an open-source Python-to-Excel option that can cache reusable objects.
  • The answers describe features and preferences but provide no comparative reliability or performance evidence.

Tags

Full text
# What is the best solution to use QuantLib within Excel?


# What is the best solution to use QuantLib within Excel?












Excel is likely the most widespread instrument across all not-only-quants desks; in addition, we have to keep in mind that Bloomberg and Reuters allow to easily import real time data in Excel, and this is very handy.

Due to these features, I'm wondering what's the easiest and most reliable solution to use QuantLib in Excel.

So far, these are the ways I know:

- QuantLibXL;

- RExcel together with RQuantLib;

- PyXLL together with QuantLib-Python (actually, I've not tried this one on the field, yet)

Each one has its pros and con's, I must admit QuantLibXL is harder than I thought before; being quite able to code with `R`, so far my favorite solution is the second one.

If anyone knows any better solution and/or a good step-by-step tutorial for QuantLibXL (something which explains how to deal easily with "classes" in a spreadsheet), it would be really appreciated if he could write it here.

## Answer by Yannis (score 6)

https://quant.stackexchange.com/a/14207

A free to use Excel wizard-based Add-In providing QuantLib-backed derivatives pricing analytics directly in Excel is available at https://www.deriscope.com Since August 18, 2017 Deriscope has moved from beta to production.

Disclosure: answerer is author of the package.

Update as of 24 Oct 17: Deriscope already covers the whole QuantLib

## Answer by user88721 (score 0)

https://quant.stackexchange.com/a/84121

One new option to consider is using xlOil to bind Python to Excel, using a local Python installation and the official QuantLib-Python packages. This has the following advantages:

- Uses the vanilla Python wrapper to QuantLib which is probably the most used and tested

- Easy inter-operation with other Python libraries

- The excel binding mechanisms are fully decoupled form the domain-specific code

- Easy to re-use code and examples produced by typical quant/developers which tends to be in Python

- Fully open-sourced stack

xlOil specifically has a nice feature that it caches opaque Python objects which can be then re-used in Excel, similarly to how the old QuantLib Excel Addin works.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.