Video recordings of the session are available here and here on the SkillsMatter website.

Plan for the session

  1. Using the prebuilt version of QuantLibXL:
    1. Show some of the basic ideas of how ‘objects’ work (ohRepository...).
    2. Look at some of the data and utilities in there — date handling, … .
    3. Look at some of the example spreadsheets.
  2. Using a debuggable version of QuantLibXL:
    1. Debug one of the example sheets, to show how we get down to the actual underlying mathematics.
    2. Looking at how we would add a new function.
  3. Hand over to Bojan to hear about ‘programmatically’ using QuantLib (ie. from a language like Python), and some of his projects around QuantLib.

QuantLib websites

Good to know: market conventions

See OpenGamma’s helpful PDF.

The pre-built version for Excel

See either:

Building QuantLib (first without the Excel parts)

It took my iMac i7 3.4 GHz 16 Gb RAM about 20 minutes to build QuantLib; the test suite took about another 15 minutes to run.

QuantLib installation instructions (on VS 2010) here: http://quantlib.org/install/vc10.shtml.

Don’t forget that VS 2010 is also known as ‘vc10’ (see: http://superuser.com/a/194065).

A post on Stack Overflow gives a link to the free edition of Visual Studio 2010 Express: http://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso.

I used the 32-bit version of Boost: https://sourceforge.net/projects/boost/files/boost-binaries/1.62.0/boost_1_62_0-msvc-10.0-32.exe/download.

I extracted the source files into my C:\quantlib directory. I extracted Boost into C:\boost.

Note that you want to use the directory C:\boost\boost_1_62_0\lib32-msvc-10.0 as the library directory.

Here is a snapshot of the conclusion of the build:quantlib_tests_completed

Building QuantLib for Excel

Instructions at: http://quantlib.org/quantlibaddin/build_qlxl.html.

You need to download a few other projects into the C:\quantlib directory, so that you end up with this (note that you need the QuantLib directory to not have the version number hanging off the end):all_directories_for_quantlib_xl_build

Debugging the Excel version

Instructions are in the FAQ: http://quantlib.org/quantlibxl/faq.html#faq_item_debugexcel.

However, I do:

  1. Set QuantLibXLStatic as the ‘Startup project’.
  2. Go to its Properties page and edit the Debugging section as follows:
    • Command: C:\Program Files (x86)\Microsoft Office\Office14\excel.exe
    • Command arguments: C:\quantlib\QuantLibXL\xll\$(TargetName).xll

    Useful information on VS macros is here.

Example spreadsheets

There are example spreadsheets in the prebuilt distribution, or you can go visit Luigi Ballabio’s GitHub account: https://github.com/lballabio/quantlib-old/tree/master/QuantLibXL/StandaloneExamples.

Slide presentation on the future of QuantLibXL

Discusses spreadsheet technologies and looks at how QuantLibXL might fit in amongst these: http://quantlib.org/slides/qlum16l/ehlers.pdf.

Links to people/products using QuantLib

Bojan Nikolic has built some interesting projects around QuantLib: http://www.bnikolic.co.uk/ql/.

One of his projects integrates Python into Excel. There are a few alternatives, if you are interested:

The company Quaternion uses QuantLib as their core engine. They have started a project called Open Source Risk: https://github.com/OpenSourceRisk.

Building QuantLib on Linux

There are some instructions on the QuantLib homepage:

Building QuantLib-Python on Windows

See https://vineetv.wordpress.com/2015/07/07/installing-quantlib-python-windows/.