Video recordings of the session are available here and here on the SkillsMatter website.
Plan for the session
- Using the prebuilt version of QuantLibXL:
- Show some of the basic ideas of how ‘objects’ work (
ohRepository...
). - Look at some of the data and utilities in there — date handling, … .
- Look at some of the example spreadsheets.
- Show some of the basic ideas of how ‘objects’ work (
- Using a debuggable version of QuantLibXL:
- Debug one of the example sheets, to show how we get down to the actual underlying mathematics.
- Looking at how we would add a new function.
- 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
- The main site: http://quantlib.org/index.shtml.
- The site for the Excel add-in: http://quantlib.org/quantlibxl/.
- The site for QuantLibAddin — used in QLXL, but can interact with other apps:http://quantlib.org/quantlibaddin/.
Good to know: market conventions
The pre-built version for Excel
See either:
- http://quantlib.org/quantlibxl/, or
- https://sourceforge.net/projects/quantlib/files/QuantLibXL/1.8.0/.
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:
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):
Debugging the Excel version
Instructions are in the FAQ: http://quantlib.org/quantlibxl/faq.html#faq_item_debugexcel.
However, I do:
- Set QuantLibXLStatic as the ‘Startup project’.
- 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.
- Command:
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:
- PyInEx: https://github.com/sometheycallme/levinsky-pyinex.
- pyxll from Enthought: https://www.enthought.com/products/pyxll/.
- Data Nitro: https://datanitro.com/.
- XL wings: https://www.xlwings.org/.
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/.