Exemple #1
0
        public virtual void test_of()
        {
            DepositIsdaCreditCurveNode test = DepositIsdaCreditCurveNode.of(OBS_ID, ADJ_3D, BUS_ADJ, TENOR, ACT_360);

            assertEquals(test.BusinessDayAdjustment, BUS_ADJ);
            assertEquals(test.DayCount, ACT_360);
            assertEquals(test.Label, TENOR.ToString());
            assertEquals(test.ObservableId, OBS_ID);
            assertEquals(test.SpotDateOffset, ADJ_3D);
            assertEquals(test.Tenor, TENOR);
            assertEquals(test.date(TRADE_DATE, REF_DATA), LocalDate.of(2017, 1, 4));
            assertEquals(test.metadata(LocalDate.of(2017, 1, 4)), TenorDateParameterMetadata.of(LocalDate.of(2017, 1, 4), TENOR));
        }
Exemple #2
0
        public virtual void test_of()
        {
            SwapIsdaCreditCurveNode test = SwapIsdaCreditCurveNode.of(OBS_ID, ADJ_3D, BUS_ADJ, TENOR, THIRTY_U_360, FREQUENCY);

            assertEquals(test.BusinessDayAdjustment, BUS_ADJ);
            assertEquals(test.DayCount, THIRTY_U_360);
            assertEquals(test.Label, TENOR.ToString());
            assertEquals(test.ObservableId, OBS_ID);
            assertEquals(test.PaymentFrequency, FREQUENCY);
            assertEquals(test.SpotDateOffset, ADJ_3D);
            assertEquals(test.Tenor, TENOR);
            assertEquals(test.date(TRADE_DATE, REF_DATA), LocalDate.of(2026, 10, 5));
            assertEquals(test.metadata(LocalDate.of(2026, 10, 5)), TenorDateParameterMetadata.of(LocalDate.of(2026, 10, 5), TENOR));
        }