Beispiel #1
0
        public virtual void test_zeroRate()
        {
            IsdaCreditDiscountFactors test = IsdaCreditDiscountFactors.of(USD, VALUATION, CURVE);
            double relativeYearFraction    = ACT_365F.relativeYearFraction(VALUATION, DATE_AFTER);
            double discountFactor          = test.discountFactor(DATE_AFTER);
            double zeroRate = test.zeroRate(DATE_AFTER);

            assertEquals(Math.Exp(-zeroRate * relativeYearFraction), discountFactor);
        }