User's Guide ============ About JQuantLib --------------- JQuantLib is a free, open-source, comprehensive framework for quantitative finance, written in 100% Java. It provides "quants" and Java application developers several mathematical and statistical tools needed for the valuation of shares, options, futures, swaps, and other financial instruments. Audience -------- This document is primarily intended for Java developers with interest in Quantitative Finance in general and financial instrument valuation in particular. Experience in working under a Linux based development environment is expected - most of the examples are for Debian based Linux systems and derivatives. What this documentation is about? --------------------------------- This document explains the steps required for obtaining JQuantLib and building the source from command line interface on a Linux boxes or using the excellent Eclipse IDE. You can jump directly to the section which best matches your needs. Warning for Windows users ''''''''''''''''''''''''' We recommend you avoid spaces on directory names and file names. This issue was observed so many times by users of various Java applications. Actually, it is not a problem of Java applications, but the problem is the way COMMAND.COM (the command line interpreter in Windows platforms) deals with spaces, which is very specific to Windows platforms. Building JQuantLib ------------------ Building from command line '''''''''''''''''''''''''' If you prefer to build JQuantLib under Eclipse, please jump to *Building JQuantLib under Eclipse*. Requirements ............ - `JDK6 or JDK7`_ - Bazaar_ - Gradle_ Installing Bazaar ................. Simply type the following command under Debian and variants:: $ apt-get install bzr Installing Gradle ................. Please follow the steps described in the `Gradle documentation`_. Obtaining JQuantLib ................... Branch JQuantLib from Launchpad by entering the command below:: $ bzr branch lp:jquantlib Building JQuantLib .................. Simply type the command below:: $ gradle test This will build JQuantLib and run the test suite. If you find troubles, please ask for support_. The first time you call the gradle command, it will download all dependencies for you. This process will take time enough for a cup coffee. Running Samples ............... Simply type the command below:: $ gradle demo This will build JQuantLib and run the sample program EquityOptions which calculates options prices employing different methods. Generating documentation ........................ Simply type the command below:: $ gradle javadoc Then open the browser and visit these files sitting on your workspace, for example:: $ firefox jquantlib/build/docs/javadoc/index.html $ firefox jquantlib-samples/build/docs/javadoc/index.html $ firefox jquantlib-helpers/build/docs/javadoc/index.html $ firefox jquantlib-contrib/build/docs/javadoc/index.html Building JQuantLib under Eclipse '''''''''''''''''''''''''''''''' If you prefer building JQuantLib from the command line, please jump to Building JQuantLib from Command Line. Requirements ............ - `JDK6 or JDK7`_ - `Bazaar plugin`_ - `Gradle plugin`_ Installing Bazaar integration for Eclipse ......................................... | Install the plugin from update site: http://bzreclipse.org/update-site | More information at: http://wiki.bazaar.canonical.com/BzrEclipse Installing Gradle integration for Eclipse ......................................... | Install the plugin from update site: http://dist.springsource.com/release/TOOLS/gradle | More information at: https://github.com/SpringSource/eclipse-integration-gradle .. _`Gradle documentation` : http://www.gradle.org/docs/current/userguide/userguide_single.html#installation .. _support : http://jquantlib.org/Support .. _`JDK6 or JDK7` : http://www.oracle.com/technetwork/java/javase/downloads/index.html .. _`Bazaar` : http://bazaar.canonical.com/ .. _`Gradle` : http://www.gradle.org/ .. _`Bazaar plugin` : http://wiki.bazaar.canonical.com/BzrEclipse .. _`Gradle plugin` : https://github.com/SpringSource/eclipse-integration-gradle