Next: , Previous: , Up: Octave octarisk Classes   [Contents][Index]


4.9 Riskfactor.help

Octarisk Class: object = Riskfactor(id)
Octarisk Class: object = Riskfactor()

Class for setting up Riskfactor objects.

The mapping between e.g. curve or index objects and their corresponding risk factors is automatically done by using regular expressions to match the names. Riskfactors always have to begin with ’RF_’ followed by the object name. If certain nodes of curves or surfaces are shocked, the name is followed by an additional node identifier, e.g. ’RF_IR_EUR_SWAP_1Y’ for shocking an interest rate curve or ’RF_VOLA_IR_EUR_1825_3650’ for shocking a certain point on the volatility tenor / term surface.

Riskfactors can be either shocked during stresses, where custom absolute or relative shocks can be defined. During Monte-Carlo scenario generation risk factor shocks are calculated by applying statistical processes according to specified stochastic model. The random numbers follow a match of given mean, standard deviation, skewness and kurtosis according to distributions selected by the Pearson Type I-VII distribution system.

This class contains all attributes and methods related to the following Riskfactor types:

In the following, all methods and attributes are explained and a code example is given.

Methods for Riskfactor object obj:

Attributes of Riskfactor objects:

For illustration see the following example: A swap risk factor modelled by a shifted log-normal model at the three year node is set up and shifted in three stress scenarios (absolute up- and downshift, relative downshift):


disp('Setting up Swap(3650) risk factor')
r = Riskfactor();
r = r.set('id','RF_EUR-SWAP_3Y','name','RF_EUR-SWAP_3Y', ...
    'scenario_stress',[0.02;-0.01;0.8], ...
    'type','RF_IR','model','SLN','shift_type',[0;0;1], ...
    'mean',0.0,'std',0.117,'skew',0.0,'kurt',3, ...
    'node',1095,'sln_level',0.03)

Dependencies of class:

Riskfactor

Next: , Previous: , Up: Octave octarisk Classes   [Contents][Index]