search for: hestf

Displaying 1 result from an estimated 1 matches for "hestf".

Did you mean: hest
2012 Apr 26
2
ErrError in f(x, ...) : object 'g.' not found
...could help i would be very thankful. Here is my code. kappa = 1.1 theta = 0.1 sigma = 0.4 rho = -0.6 v0 = 0.2 r = 0.05 T = 0.5 s0 = 1 K = 0.5 type = 1 Hestoncall = function(kappa,theta,sigma,rho,v0,r,T,s0,K,type) { u = 0.5 b = kappa-rho*sigma a = kappa*theta x = log(s0) Hestf = function(phi) { d = sqrt((b-rho*sigma*phi*complex(1,0,1)-b )^2-sigma^2*(2*u*phi^2)) g = (b-rho*sigma*phi*complex(1,0,1)+d)/(b-rho*sigma*phi*complex(1,0,1)-d) C = r*phi*complex(1,0,1)*T + a/sigma^2*((b-rho*sigma*phi*complex(1,0,1)+d)*T-2*log((1-g.*exp(d*T))/(1-g))) D =...