search for: hestonpintegrand

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

2012 Apr 26
2
ErrError in f(x, ...) : object 'g.' not found
...ex(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 = (b-rho*sigma*phi*complex(1,0,1)+d)/sigma^2*((1-exp(d*T))/(1-g*exp(d*T))) f = exp(C+D*v0 +complex(1,0,1)*phi*x); HestonPintegrand = real (exp(-1i*phi*log(K))*f/(1i*phi)) HestonPintegrand } #int.fn = function(t){sapply(t,FUN=Hestf)} IH = integrate(Hestf,lower=0,upper=Inf,rel.tol=1e-10,subdivisions=1000000) ret = 0.5 + 1/pi*IH call = s0*ret - K*exp(r-T)*ret call } thanks in advance -- Vi...