Output Files

CCruncher leaves the output files in the directory indicated by the '-o' argument in ccruncher-cmd, or the directory indicated by the 'Output' textbox in the ccruncher-gui. CCruncher output files are:

File Content Extension Notes
segmentation.csv Portfolio or sub-portfolios simulated losses CSV One file per segmentation
ccruncher.out Execution trace TXT Only in ccruncher-gui

CCruncher uses the CSV file format to save tabular data. This is a widely accepted data format supported by all data analysis tool (SPSS, R, Excel, Matlab, Mathematica, etc.). CCruncher CSV files satisfy the following considerations:

segmentation.csv

#=============================================================================
# file generated by ccruncher-2.6.0
# input file: samples/test05.xml
# exposure: 167.00, 166.00, 167.00, 167.00, 167.00, 166.00
#=============================================================================
"S1-A", "S1-B", "S1-C", "S2-A", "S2-B", "S2-C"
44.00, 46.00, 75.00, 32.00, 39.00, 69.00
9.00, 30.00, 41.00, 14.00, 36.00, 35.00
0.00, 0.00, 3.00, 1.00, 0.00, 3.00
11.00, 21.00, 57.00, 13.00, 28.00, 67.00
11.00, 14.00, 37.00, 5.00, 8.00, 16.00
5.00, 17.00, 32.00, 13.00, 25.00, 57.00
12.00, 19.00, 29.00, 6.00, 9.00, 24.00
13.00, 31.00, 39.00, 18.00, 55.00, 71.00
1.00, 3.00, 10.00, 2.00, 2.00, 7.00
21.00, 30.00, 65.00, 15.00, 37.00, 77.00
0.00, 5.00, 8.00, 5.00, 11.00, 29.00
...
24.00, 57.00, 76.00, 14.00, 23.00, 40.00
        

These files contain the simulated losses of the segmentations disaggregated by its segments (aka. sub-portfolios). There are so many files of this type as segmentations defined in the input file, being the file name identical to the segmentation name (e.g., portfolio.csv and sector-ratings.csv). In a file, each column corresponds to a segment, and each row is a simulation performed by CCruncher.

When there is more than one segment, the sum of row losses can differ slightly from the corresponding whole portfolio loss (located in a different file) due to the rounding errors (numeric values are rounded to 2 decimal places).

ccruncher.out

> bin/ccruncher-cmd -w -o data -DNU=12.54 -DW1=0.29 -DW2=0.48 -DR12=0.21 samples/test05.xml

        ccruncher is Copyright (C) 2004-2023 Gerard Torrent and licensed        
         under the GNU General Public License, version 2. More info at          
                            http://www.ccruncher.net                            

general information ************************************************************
  ccruncher version                                              2.6.0 (06b9824)
  start time (dd/MM/yyyy hh:mm:ss)                           06/03/2023 07:27:52

reading input file *************************************************************
  file name                 [/home/gerard/projects/ccruncher/samples/test05.xml]
  file size                                                            274.56 KB
  macro (user defined)                                                  NU=12.54
  macro (user defined)                                                  R12=0.21
  macro (user defined)                                                   W1=0.29
  macro (user defined)                                                   W2=0.48
  macro (input file)                                              numsims=200000
  macro (input file)                                             copula=t(12.54)
  macro (input file)                                             antithetic=true
  macro (input file)                                                      seed=0
  file checksum (adler32)                                             2868339635
  elapsed time                                                      00:00:00.016

input file summary *************************************************************
  initial date                                                        01/01/2013
  end date                                                            01/01/2014
  number of ratings                                                            4
  number of factors                                                            2
  copula type                                                           t(12.54)
  default probability functions                                         computed
  transition matrix period (months)                                           12
  number of obligors                                                        1000
  number of assets                                                          1000
  number of values                                                          1000
  number of segmentations                                                      2

output files *******************************************************************
  directory                               [/home/gerard/projects/ccruncher/data]
  segmentation              [/home/gerard/projects/ccruncher/data/portfolio.csv]
  segmentation          [/home/gerard/projects/ccruncher/data/sector-rating.csv]

Monte Carlo ********************************************************************
  seed used to initialize RNG                                   1500542872427502
  maximum execution time (seconds)                                         86400
  maximum number of iterations                                            200000
  antithetic mode                                                           true
  block size                                                                 128
  number of threads                                                            4
  running Monte Carlo [1000 simulations per hash] ------------------------------
    ............................................................................
    ............................................................................
    ................................................
  simulations realized                                                    200000
  elapsed time                                                      00:00:02.012

general information ************************************************************
  end time (dd/MM/yyyy hh:mm:ss)                             06/03/2023 07:27:54
  total elapsed time                                                00:00:02.033
        

ccruncher-gui program saves the execution trace in the ccruncher.out file. This file, together with the input file, allows interpreting the output files contents. The command line program (ccruncher-cmd) doesn't save its trace because it is designed with the Unix philosophy in mind (Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.). If you want to preserve the trace, you can redirect stdout to a file or use the tee command.