3.2 Implementation workflow
3.2.1 Overview
The following enumeration gives an overview of the main script octarisk.m (See octarisk for details):
- DEFINITION OF VARIABLES
- Parse parameter file
- read in general variables
- read in VAR specific variables
- INPUT
- Processing Instruments data
- Processing Riskfactor data
- Processing Positions and Portfolio data
- Processing Stresstest data
- Processing Market data
- CALCULATION
- Model Riskfactor Scenario Generation
- Load input correlation matrix
- Get distribution parameters from riskfactors
- call MC scenario generations
- Monte Carlo Riskfactor Simulation for all timesteps
- Take risk factor stress scenarios from stressdefinition
- Process yield curves and volatility surface
- Update market data objects with risk factor shocks
- Full Valuation of all Instruments in all MC and stress scenarios
- 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
- Print Report including position VaRs
- Plotting
- HELPER FUNCTIONS