Giter Site home page Giter Site logo

quant_scala-quantlib's Introduction

scala-quantlib

Using QuantLib with Scala

Installing

On Ubuntu

  1. Install C++ Boost (>= 1.39) for building QuantLib and SWIG for building its Java Native Interfaces (JNIs):

    sudo apt-get install libboost-all-dev swig

  2. Clone QuantLib from GitHub and build it (this can take a while):

    git clone https://github.com/lballabio/quantlib.git cd quantlib/QuantLib sh autogen.sh ./configure make # for multiple jobs at once: make --jobs sudo make install

  3. Build the QuantLib JNIs using SWIG:

    cd ../QuantLib-SWIG sh autogen.sh #set JAVA_HOME if not already set, e.g. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 ./configure --with-jdk-include=${JAVA_HOME}/include --with-jdk-system-include=${JAVA_HOME}/include/linux make -C Java sudo make install

  4. The resulting QuantLib.jar (and .so, etc.) are added to /usr/local/lib, so

###either:

add it to LD_LIBRARY_PATH (when using e.g. sbt):

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

###or:

run java with the option:

  -Djava.library.path=/usr/local/lib/

On Jenkins the above code needs to be added to JVM options

Note that the JAR references the other files added to /usr/local/lib, so adding it alone isn't enough

  1. If you're using sbt, add to build.sbt:

    unmanagedJars in Compile += file("/usr/local/lib/QuantLib.jar")

  2. Finally, in your application's boot code call:

    System.loadLibrary("QuantLibJNI")

quant_scala-quantlib's People

Contributors

i-k avatar

Watchers

James Cloos avatar Andrei Pozolotin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.