예제 #1
0
        //-------------------------------------------------------------------------
        public virtual void test_ratePointSensitivity_fixing()
        {
            SimpleIborIndexRates test = SimpleIborIndexRates.of(GBP_LIBOR_3M, DATE_VAL, CURVE, SERIES);

            assertEquals(test.ratePointSensitivity(GBP_LIBOR_3M_BEFORE), PointSensitivityBuilder.none());
            assertEquals(test.ratePointSensitivity(GBP_LIBOR_3M_VAL), PointSensitivityBuilder.none());
        }
예제 #2
0
        public virtual void test_ratePointSensitivity_afterValuation()
        {
            SimpleIborIndexRates test     = SimpleIborIndexRates.of(GBP_LIBOR_3M, DATE_VAL, CURVE, SERIES);
            IborRateSensitivity  expected = IborRateSensitivity.of(GBP_LIBOR_3M_AFTER, 1d);

            assertEquals(test.ratePointSensitivity(GBP_LIBOR_3M_AFTER), expected);
        }
예제 #3
0
        public virtual void test_ratePointSensitivity_onValuation_noFixing()
        {
            SimpleIborIndexRates test     = SimpleIborIndexRates.of(GBP_LIBOR_3M, DATE_VAL, CURVE, SERIES_EMPTY);
            IborRateSensitivity  expected = IborRateSensitivity.of(GBP_LIBOR_3M_VAL, 1d);

            assertEquals(test.ratePointSensitivity(GBP_LIBOR_3M_VAL), expected);
            assertEquals(test.rateIgnoringFixingsPointSensitivity(GBP_LIBOR_3M_VAL), expected);
        }