Next: CapFloor.help, Previous: Swaption.help, Up: Octave octarisk Classes [Contents][Index]
Class for setting up Stochastic objects. A Stochastic instrument uses a risk factor with random variables (either uniform, normal or t-distributed) to draw values from a 1D Surface. The surface has exactly one value per given quantile [0,1]. This instrument type can be used to pre-calculate values in another risk system for a given risk factor distribution.
In the following, all methods and attributes are explained and a code example is given.
Methods for Stochastic object obj:
Attributes of Stochastic objects:
For illustration see the following example: A stochastic value object is generated. Quantile values are given by a 1-dim volatility surface. The resulting Stress value ([95;100;105]) is retrieved:
disp('Pricing Pricing Stochastic Value Object') r = Riskfactor(); r = r.set('value_base',0.5,'scenario_stress',[0.3;0.50;0.7],'model','BM'); value_x = 0; value_quantile = [0.1,0.5,0.9]; value_matrix = [90;100;110]; v = Surface(); v = v.set('axis_x',value_x,'axis_x_name','DATE', ... 'axis_y',value_quantile,'axis_y_name','QUANTILE'); v = v.set('values_base',value_matrix); v = v.set('type','STOCHASTIC'); s = Stochastic(); s = s.set('sub_type','STOCHASTIC','stochastic_rf_type','uniform', ... 't_degree_freedom',10); s = s.calc_value('31-Mar-2016','base',r,v); s = s.calc_value('31-Mar-2016','stress',r,v); stress_value = s.getValue('stress')
Dependencies of class:
Next: CapFloor.help, Previous: Swaption.help, Up: Octave octarisk Classes [Contents][Index]