Coding JQuantLib in Netbeans
From MediaWiki
Running JQuantLib in Netbeans
The Development Environment page describes in detail the steps to build, run and code JQuantLib in Eclipse. This page explores another wonderful option - building and running JQuantLib in Netbeans. As read the steps required to build JQuantLib in Netbeans, you will realize that it can't get any simpler. Moreover, help and assistance is always at arms length, feel free to contact me if need be. I'll be more than glad to help you get started with Netbeans.
Simple steps to get you started
- Download Netbeans
- Install Netbeans
- Go to Tools -> Plugins and install the Maven plugin.
- Since JQuantLib depends on Subversion, download and install Subversion. Depending on your platform, you can do apt-get, pkg-get or download an exe. Make sure that your PATH variable has svn.
- Open Netbeans, go to Versioning -> Subversion -> Checkout. In the repository URL say http://jquant.svn.sourceforge.net/svnroot/jquant/trunk/jquantlib. Depending on your network settings, you may or may not have to provide proxy server. Press Next, checkout trunk in folder of your choice and check mark the check box that says 'Scan for Netbeans Project after Checkout'.
- When the checkout completes Netbeans will try to create a Java Project out of JQuantLib source code. When prompted select Java Project -> Java Project with Existing Sources. Next you will be asked to provide the source folders.
- Select jquantlib/src/main/java and jquantlib/src/main/test folders. No other configurations are required. You can finish creating the project.
- At this point, your JQuantLib project will show red marks indicating that not all dependencies are satisfied.
- JQuantLib uses two other libraries, you need to download and unzip/untar them
- Now right click your Netbeans project node and go to Properties -> Libraries -> Add JAR/Folder. Add both fastutil.jar and colt.jar. Now press the Add Library button and select the JUnit libraries.
- That's all to it. Now press the run button, you will be prompted for the main class. Choose org.jquantlib.examples.EquityOptions and you are all set.
- The output window shows all too familiar output
run:
- EquityOptions :::::
Method European Bermudan American
Black-Scholes 3.844307792 NaN NaN
Barone-Adesi/Whaley NaN NaN NaN (TO BE DONE)
Bjerksund/Stensland NaN NaN NaN (TO BE DONE)
Integral NaN NaN NaN (TO BE DONE)
Finite differences NaN NaN NaN (TO BE DONE)
Binomial Jarrow-Rudd NaN NaN NaN (TO BE DONE)
Binomial Cox-Ross-Rubinstein NaN NaN NaN (TO BE DONE)
Additive equiprobabilities NaN NaN NaN (TO BE DONE)
Binomial Trigeorgis NaN NaN NaN (TO BE DONE)
Binomial Tian NaN NaN NaN (TO BE DONE)
Binomial Leisen-Reimer NaN NaN NaN (TO BE DONE)
Binomial Joshi NaN NaN NaN (TO BE DONE)
Monte Carlo (crude) NaN NaN NaN (TO BE DONE)
Monte Carlo (Sobol) NaN NaN NaN (TO BE DONE)
Monte Carlo (Longstaff Schwartz) NaN NaN NaN (TO BE DONE)
Time taken: 601ms BUILD SUCCESSFUL (total time: 1 second)
--Praneet.tiwari 06:48, 30 October 2008 (UTC)Praneet Tiwari

