Exemplo n.º 1
0
 public void test_euibor3m() {
   IborIndex test = IborIndex.of("EUR-EURIBOR-3M");
   assertEquals(test.getCurrency(), EUR);
   assertEquals(test.getName(), "EUR-EURIBOR-3M");
   assertEquals(test.getTenor(), TENOR_3M);
   assertEquals(test.getFixingCalendar(), EUTA);
   assertEquals(test.getFixingDateOffset(), DaysAdjustment.ofBusinessDays(-2, EUTA));
   assertEquals(test.getEffectiveDateOffset(), DaysAdjustment.ofBusinessDays(2, EUTA));
   assertEquals(
       test.getMaturityDateOffset(),
       TenorAdjustment.ofLastBusinessDay(
           TENOR_3M, BusinessDayAdjustment.of(MODIFIED_FOLLOWING, EUTA)));
   assertEquals(test.getDayCount(), ACT_360);
   assertEquals(test.toString(), "EUR-EURIBOR-3M");
 }
Exemplo n.º 2
0
 public void test_usdLibor3m() {
   IborIndex test = IborIndex.of("USD-LIBOR-3M");
   assertEquals(test.getCurrency(), USD);
   assertEquals(test.getName(), "USD-LIBOR-3M");
   assertEquals(test.getTenor(), TENOR_3M);
   assertEquals(test.getFixingCalendar(), GBLO);
   assertEquals(test.getFixingDateOffset(), DaysAdjustment.ofBusinessDays(-2, GBLO));
   assertEquals(
       test.getEffectiveDateOffset(),
       DaysAdjustment.ofBusinessDays(
           2, GBLO, BusinessDayAdjustment.of(FOLLOWING, GBLO.combineWith(USNY))));
   assertEquals(
       test.getMaturityDateOffset(),
       TenorAdjustment.ofLastBusinessDay(
           TENOR_3M, BusinessDayAdjustment.of(MODIFIED_FOLLOWING, GBLO.combineWith(USNY))));
   assertEquals(test.getDayCount(), ACT_360);
   assertEquals(test.toString(), "USD-LIBOR-3M");
 }
Exemplo n.º 3
0
 public void test_gbpLibor3m() {
   IborIndex test = IborIndex.of("GBP-LIBOR-3M");
   assertEquals(test.getCurrency(), GBP);
   assertEquals(test.getName(), "GBP-LIBOR-3M");
   assertEquals(test.getTenor(), TENOR_3M);
   assertEquals(test.getFixingCalendar(), GBLO);
   assertEquals(
       test.getFixingDateOffset(),
       DaysAdjustment.ofCalendarDays(0, BusinessDayAdjustment.of(PRECEDING, GBLO)));
   assertEquals(
       test.getEffectiveDateOffset(),
       DaysAdjustment.ofCalendarDays(0, BusinessDayAdjustment.of(FOLLOWING, GBLO)));
   assertEquals(
       test.getMaturityDateOffset(),
       TenorAdjustment.ofLastBusinessDay(
           TENOR_3M, BusinessDayAdjustment.of(MODIFIED_FOLLOWING, GBLO)));
   assertEquals(test.getDayCount(), ACT_365F);
   assertEquals(test.toString(), "GBP-LIBOR-3M");
 }
Exemplo n.º 4
0
 @Test(dataProvider = "name")
 public void test_toString(IborIndex convention, String name) {
   assertEquals(convention.toString(), name);
 }