Next: , Previous: , Up: Developer guide   [Contents][Index]


3.2 Implementation workflow

3.2.1 Overview

The following enumeration gives an overview of the main script octarisk.m (See octarisk for details):

  1. DEFINITION OF VARIABLES
    1. Parse parameter file
    2. read in general variables
    3. read in VAR specific variables
  2. INPUT
    1. Processing Instruments data
    2. Processing Riskfactor data
    3. Processing Positions and Portfolio data
    4. Processing Stresstest data
    5. Processing Market data
  3. CALCULATION
    1. Model Riskfactor Scenario Generation
      • Load input correlation matrix
      • Get distribution parameters from riskfactors
      • call MC scenario generations
    2. Monte Carlo Riskfactor Simulation for all timesteps
    3. Take risk factor stress scenarios from stressdefinition
    4. Process yield curves and volatility surface
    5. Update market data objects with risk factor shocks
    6. Full Valuation of all Instruments in all MC and stress scenarios
    7. Portfolio Aggregation
      • loop over all portfolios / positions
      • VaR Calculation
        • sort arrays
        • Get Value of confidence scenario
        • make vector with Harrel-Davis Weights
      • Calculate Expected Shortfall
    8. Print Report including position VaRs
    9. Plotting
  4. HELPER FUNCTIONS