Skip to content

lcallenbach/quantlibaddin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibreOffice QuantLib Addin

LibreOffice-Calc QuantLib Addin

This document provides first steps with

  1. code generation
  2. code compilation

This code has been tested for QuantLib-1.9.1 under Linux using Anaconda3 and LibreOffice 5.2.

code generation

Change to the directory gensrc. Execute 'python main.py -o'.
Requirements:

  1. Python 3
  2. PyParsing package

Both requirements are met using Anaconda3.

code compilation

Change to the directory 'Calc'. Edit the file 'environment.sh' - the meaning of the variables is the following:

  1. QL_PATH: path to your QuantLib source code (e.g. QL_PATH=/test/QuantLib)
  2. QL_LIB: path to the compiled QuantLib library (e.g. QL_LIB=/test/QuantLib/ql/.libs)
  3. BOOST_PATH: path to your boost development installation (header files, depending on your system)

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). If both paths are set call 'make' (for parallel execution of 4 processes call 'make -j4').

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'.
Requirements:

  1. installation of LibreOffice SDK 2.. development files for boost and compiled boost libraries (boost_regex, boost_serialization, lboost_filesystem, lboost_system)
  2. QuantLib library and QuantLib header files
  3. C++ compiler (e.g. g++ under Gnu/Linux)

platforms

Tested on Gnu/Linux amd64 with LibreOffice 5.2.