Getting Started - Installation

Step 1. If you have selected a packed distribution, unpack it.


  tar -xvzf ccruncher-X.Y_ZZZ.tgz
  cd ccruncher-X.Y
    

Step 2. CCruncher uses a library named expat not included in CreditCruncher distribution packages. Check that you have expat installed (find file libexpat.so or libexpat.dll, usually in folder /usr/lib). In case you don't have it, install it from expat site (if you use a RPM system, install the package named expat). CCruncher source distribution requires that you have expat-devel installed (find file expat.h, usually in folder /usr/include). In case you don't have it, install it from expat site (if you use a RPM system, install package named expat-devel).

Step 3. CCruncher uses a library named zlib not included in CreditCruncher distribution packages. Check that you have the zlib installed (find file libz.so or zlib1.dll, usually in folder /usr/lib). In case you don't have it, install it from zlib site (if you use a RPM system, install the package named zlib). CCruncher source distribution require that you have zlib-devel installed (find file zlib.h, usually in folder /usr/include). In case that you don't have it, install it from zlib site (if you use a RPM system, install package named zlib-devel).

Step 4. CreditCruncher uses a statistical package named R to compute risk indicators. Install it from http://www.r-project.org/. If you plan to realize the statistical computations with your own tools (pe. Excel) you can skip this step. If you use a RPM system, install package R.

Step 5. If you have a source distribution, run next commands (pay attention to $PWD):


  ./configure --prefix=$PWD
  make
  make install
    

If you want to create a MPI version (to run ccruncher in a cluster) type:


  export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/include/lam
  export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/lam
  ./configure --prefix=$PWD --enable-mpi
  make
  make install
    

Replace lam by openmpi if you are using a Open-MPI MPI implementation instead of Lam-MPI MPI implementation.


Getting Started - Usage

Step 1. Create a XML ccruncher input file. First, read the Technical Document and the Input File Reference. You can use a file from directory samples as template. Take into consideration that xml input can be gziped (gz extension) to reduce the input file size. Caution, gzip is a compression algorithm different from zip.

Step 2. Run ccruncher


  bin/ccruncher --help
  bin/ccruncher -vf --hash=100 --path=./data file.xml
    

Step 3. Check the output generated (plain text files). The first field is the simulation counter, second field is the simulated value.


  ls -l data/*
  more data/segmentation-segment.out
    

Step 4. Compute the Value at Risk


  bin/report data/segmentation-segment.out
    

or open a R console and type:


  > source("bin/report.R")
  > x <- ccruncher.read("data/portfolio-rest.out")
  > ccruncher.summary(x, alpha=0.99)
  > ccruncher.plot(x, show="pdf")
  > ccruncher.plot(x, show="cdf")
  > ccruncher.plot(x, alpha=0.95, show="mean")
  > ccruncher.plot(x, alpha=0.95, show="stddev")
  > ccruncher.plot(x, alpha=0.95, var=0.99, show="VaR")
  > ccruncher.plot(x, alpha=0.95, var=0.99, show="ES")
  > ccruncher.plot(x, alpha=0.95, var=0.99, show="all")
  > quit(save='no')
    

Copyright © 2004-2007 Gerard Torrent Last modified: 03-Aug-2007