HestonEstimator.HestonCall.PutIntegrandFunc C# (CSharp) Method

PutIntegrandFunc() public method

public PutIntegrandFunc ( double u ) : double
u double
return double
        public double PutIntegrandFunc(double u)
        {
            Complex I = Complex.I;
            Complex Iu = Complex.I * u;
            Complex A = Complex.Exp(-Iu * Math.Log(this.K));
            Complex complexVal1 = A * Phi(u - I, this.kappa, this.theta, this.sigma, this.rho, this.s0, this.v0, this.rate - this.dividend, this.T) / Iu;
            Complex complexVal2 = A * Phi(u, this.kappa, this.theta, this.sigma, this.rho, this.s0, this.v0, this.rate - this.dividend, this.T) / Iu;
            return complexVal2.Re - this.K * complexVal1.Re;
        }