Previous: , Up: Octave Functions and Scripts   [Contents][Index]


5.121 pricing_option_cpp

Loadable Function: OptionVec = pricing_option_cpp(option_type, call_flag, S_vec, X_vec, T_vec, r_vec, sigma_vec, divrate_vec, n)

Compute the put or call value of different equity options.

This function should be called from Option class which handles all input and ouput data.

Input and output variables:

Example Call:

retvec = pricing_option_cpp(1,false,[10000;9000;11000],11000,365,0.01,[0.2;0.025;0.03],0.0)
retvec =
   1351.5596280726359
   1890.5481712408509
     83.4751762658461