Next: Swaption.help, Previous: Synthetic.help, Up: Octave octarisk Classes [Contents][Index]
Class for setting up Surface objects.
Surface class is used for specifying IndexVol, IRVol, Stochastic, Prepayment or Dummy Surfaces. A Surface (or Cube) stores two- or three-dimensional values (e.g. term, tenor and/or moneyness dependent volatility values. Surfaces can be shocked with risk factors (e.g. risk factor types RF_VOLA_EQ or RF_VOLA_IR) at any coordinates of the multi-dimensional space in MC or stress scenarios.
This class contains all attributes and methods related to the following Surface types:
In the following, all methods and attributes are explained and a code example is given.
Methods for Surface object obj:
Attributes of Surface objects:
For illustration see the following example:
disp('Setting up an Index Surface and Risk factor, apply shocks and retrieve values:')
r1 = Riskfactor();
r1 = r1.set('id','V1','scenario_stress',[1.0;-0.5], ...
'model','GBM','shift_type',[1;1], ...
'node',730,'node2',1);
riskfactor_struct(1).id = r1.id;
riskfactor_struct(1).object = r1;
v = Surface();
v = v.set('id','V1','axis_x',[365,3650], ...
'axis_x_name','TERM','axis_y',[0.9,1.0,1.1], ...
'axis_y_name','MONEYNESS');
v = v.set('values_base',[0.25,0.36;0.22,0.32;0.26,0.34]);
riskfactor_cell = cell;
riskfactor_cell(1) = 'V1';
v = v.set('type','INDEX','riskfactors',riskfactor_cell);
v = v.apply_rf_shocks(riskfactor_struct);
base_value = v.interpolate(365,0.9)
base_value = v.getValue('base',365,0.9)
stress_value = v.getValue('stress',365,0.9)
Dependencies of class:
Next: Swaption.help, Previous: Synthetic.help, Up: Octave octarisk Classes [Contents][Index]