HullAndWhiteOneFactor.SwaptionHW1.HWBond C# (CSharp) Метод

HWBond() приватный Метод

Calculates a vector of zero coupon bond prices (discount factors) within the Hull-White model. This is a version done to double check the HW swaption.
private HWBond ( double a, double sigma, double r, Vector T, double t ) : Vector
a double /// Hull-White alpha parameter. ///
sigma double /// Hull-White sigma parameter. ///
r double /// Short rate value. ///
T Vector /// Vector of bond maturity. ///
t double /// Time at which the valuation is done. ///
Результат Vector
        private Vector HWBond(double a, double sigma, double r, Vector T, double t)
        {
            double y = r - this.alphaTFunc(t);
            Vector result = new Vector(T.Length);
            for (int i = 0; i < T.Length; i++)
            {
                result[i] = Math.Exp(A(t, T[i], a, sigma, this.zeroRateCurve) - y * B(T[i] - t, a));
            }
            return result;
        }