Libor-0.4     9-24-03

Contents

Java source code can be downloaded (file martingale-xxx).

Credits

.

Installation

Unpack the file libor-0.4.tar.gz. This will create the directory libor-0.4 containing the entire distribution. Please don't delete any subdirectories even if they are empty - they will be filled during installation.

No installation

is necessary if you start a new project in your IDE and simply add the subdirectory src to the project. For compilation with g++ you need to set the include path with

-I/path_to_directory/src
-I/path_to_directory/src/tnt
-I/path_to_directory/src/tnt/tnt
-I/path_to_directory/src/tnt/jama

and link with
-lm

Automatic installation

Please accept my apologies that this is not a standard GNU distribution (./configure, make, make install) The reason for this is that I could not determine how to build libraries with autoconf, automake and libtool. Instead I am relying on a Makefile published by Jacob Dreyer of Geotechnical Software Services.

Set the environment variable DEV_ROOT to point to the directory libor-0.4:

export DEV_ROOT=/path_to_directory/libor-0.4

This variable is needed by the Makefiles. The Makefiles assume compilation with the GNU tools (gcc, make,...) on a Linux distribution. If you don't have these please proceed as above. If you have these tools but are not running Linux please inspect the top level Makefile and edit the IncludeDirs and LibraryDirs variables.

Now move into the directory libor-0.4 and type make. This may or may not work on your system. If it works everything is built and installed in subdirectories of libor-0.4. The object files are in obj and libraries (examples, martingale) are in the directory lib. An executable main is in bin. This is the Libor calibration example in dimension 50 with input files

SyntheticData/CapletsIn-PC-dim50-M-JR.txt,
SyntheticData/SwaptionsIn-PC-dim50-M-JR.txt

(prices generated in a predictor-corrector (PC) Libor Market Model of dimension 50 with M-vol-surface and JR-correlations) and can be executed once we have pointed LD_LIBRARY_PATH to the lib directory:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEV_ROOT/lib

This program must be executed from the top level directory ($DEV_ROOT) by typing bin/main otherwise it will not find the input files.

The program calibrates a driftless LMM in dimension 50 with Jaeckel-Rebonato (JR) vol-surface and Coffee-Shoenmakers (CS) correlations to the input prices. During execution it reports the current minimum of the calibration error (objective function). The output files CapletsOut.txt, SwaptionsOut.txt are in the the top level directory and report the relative calibration error for each instrument in % (caplet prices being reproduced exactly).

You can then run other examples and test programs from main.cc by uncommenting the respective function calls and include directives and recompiling with make in the top level directory ($DEV_ROOT). The file main.cc is in $DEV_ROOT/src/examples.

Documentation

The command make docs in the top level directory generates the doxygen html documentation. The entry point is $(DEV_ROOT)/doc/Index.html. Of course this assumes that you have doxygen installed on your system.

License

The software is distributed under the GPL which you can find here. I retain the copyrights to the manuscript Monte Carlo Simulation With Java And C++ but grant you the right to make two backup copies.

Lack of Warranty

Everything contained in this distribution is provided AS IS with no warranty explicit or implied. Please make sure you understand the disclaimer, lack of warranty and unfitness for purpose. You might also want to read the to-do list to see what state this code is in.

Have fun,

Michael J Meyer (spyqqqdia@yahoo.com)