Construct risk factor object. Riskfactor Class Inputs:
- name (string): Name of object
- id (string): Id of object
- type (string): risk factor type
- description (string): Description of object
- model (string): statistical model in list [GBM,BM,SRD,OU]
- parameters (vector): vector with values [mean,std,skew,kurt, ...
start_value,mr_level,mr_rate,node,rate]
If no input arguments are provided, a dummy IR risk factor object is generated.
The constructor of the risk factor class constructs an object with the
following properties:
Class properties:
- name: Name of object
- id: Id of object
- description: Description of object
- type: risk factor type
- model: risk factor model
- mean: first moment of risk factor distribution
- std: second moment of risk factor distribution
- skew: third moment of risk factor distribution
- kurt: fourth moment of risk factor distribution
- start_value: Actual spot value of object
- mr_level: In case of mean reverting model this is the mean reversion
level
- mr_rate: In case of mean reverting model this is the mean reversion rate
- node: In case of a interest rate or spread risk factor this is the term node
- rate: In case of a interest rate or spread risk factor this is the term
rate at the node
- scenario_stress: Vector with values of stress scenarios
- scenario_mc: Matrix with risk factor scenario values (values per
timestep per column)
- timestep_mc: MC timestep per column (cell string)
property_value = Riskfactor.getValue((base,stress,mc_timestep),’abs’)
Riskfactor Method getValue
Return the value for a risk factor object. Specify the desired return values
with a property parameter.
If the second argument abs is set, the absolut scenario value is calculated
from scenario shocks and the risk factor start value.
Timestep properties:
- base: return base value
- stress: return stress values
- any regular MC timestep (e.g. ’1d’): return scenario (shock) values at
MC timestep
property_value = Riskfactor.get (property)
object = Riskfactor.set (property, value)
Riskfactor Methods get / set
Get / set methods for retrieving or setting risk factor properties.
See also: Instrument.