Pelsser.SquaredGaussianModel.Mu0 C# (CSharp) Method

Mu0() public method

Calculates the mu(t, T, y) used by the Caplets.
public Mu0 ( double T ) : double
T double The span of time to calculate the function on.
return double
        public double Mu0(double T)
        {
            if (T == 0) return 0;

            // Initialization of the integral.
            double integralMu = 0;
            int I = DVPLDOM.AdaptiveTimeDiscretization.DiscreteTime(T, this.CacheDates);
            double delta = this.CacheDates[1] - this.CacheDates[0];
            double[] b = B(0, I, delta);

            for (int i = 0; i < I; i++)
            {
                integralMu += this.dDeltaT[I - i] * b[i];
            }

            integralMu *= this.sigma1SquaredTemp;

            return -integralMu * delta;
        }