The QuantLib addin provides an interface to the classes and class methods / functions of the financial library QuantLib (www.quantlib.org) which is written in C++. On this page you will not find an introduction of how to use this library. Rather it is an implementation of an interface to LibreOffice/Calc for the mentioned C++ classes and methods / functions. For examples see the provided examples. These examples are "translations" of the C++ examples provided by the QuantLib library in the Examples folder.
Binary and Examples
Generated addin for Linux/amd64 (debian) using LibreOffice 5.2: Calc Addin (current version 1.0 for QuantLib-1.12)
Examples based on the Calc addin:
If you start LibreOffice with the extension you will have to wait a few seconds (huge size of addin).
All examples are available as an archive.
Not all QuantLib objects are stored by the addin. Some are instantiated on the fly (enumerated objects). Further some objects require templated arguments. You will find enumerated classes and template arguments in this HTML help file. For further explanations see the Introduction text.
Some words on the addin and how it works: Introduction.
Code for QuantLib Calc-Addin on Linux/amd64:
Addin Code. Step into the directory Calc for compilation.
The modified version of QuantLib is Modified QuantLib Code. If you compile the addin code you need to change some files of the original QuantLib code (see Introduction.pdf).
Addin Code Generation
Change to the directory gensrc. Execute 'python main.py -o'.
Both requirements are met using Anaconda3.
- Python 3
- PyParsing package
Change to the directory 'Calc'. Edit the file 'environment.sh' -
the meaning of the variables is the following:
In order to compile the files genereated you have to include the path variables (e.g.
execute '. environment.sh' under Gnu/Linux-bash). Include the LibreOffice SDK development
setup to your path (e.g. execute '. ~/libreoffice/sdk/setsdkenv_unix.sh' under Gnu/Linux-bash).
- QL_PATH: path to your QuantLib source code (e.g. QL_PATH=/test/QuantLib)
- QL_LIB: path to the compiled QuantLib library (e.g. QL_LIB=/test/QuantLib/ql/.libs)
- BOOST_PATH: path to your boost development installation (header files, depending
on your system)
Requirements for Addin Compilation
If you have used the auto-installation feature of the LibreOffice SDK nothing else has to
be done. You can open the test sheet 'Examples.ods' by executing 'soffice path/Examples.ods'.
- installation of LibreOffice SDK
- development files for boost and compiled boost libraries (boost_regex, boost_serialization, lboost_filesystem, lboost_system)
- QuantLib library and QuantLib header files
- C++ compiler (e.g. g++ under Gnu/Linux)
If you have any questions please contact me. Please be aware that I respond usually at weekends.