QLNet.IborIndex.forecastFixing C# (CSharp) Method

forecastFixing() protected method

protected forecastFixing ( Date fixingDate ) : double
fixingDate Date
return double
        protected override double forecastFixing(Date fixingDate)
        {
            if (termStructure_.IsEmpty)
            {
                throw new ArgumentException("null term structure set to this instance of " + name());
            }

            Date fixingValueDate = valueDate(fixingDate);
            Date endValueDate = maturityDate(fixingValueDate);
            double fixingDiscount = termStructure_.link.discount(fixingValueDate);
            double endDiscount = termStructure_.link.discount(endValueDate);
            double fixingPeriod = dayCounter().yearFraction(fixingValueDate, endValueDate);
            return (fixingDiscount / endDiscount - 1.0) / fixingPeriod;
        }