Examples of USDDeposit


Examples of com.opengamma.analytics.financial.instrument.index.generator.USDDeposit

    assertEquals(FIXED_COUPON.getAmount(), RATE * NOTIONAL * ACCRUAL_FACTOR, 1E-10);
  }

  @Test
  public void fromGeneratorDeposit() {
    final GeneratorDeposit generator = new USDDeposit(CALENDAR);
    final Period tenor = Period.ofMonths(3);
    final CouponFixedDefinition cpnFixed = CouponFixedDefinition.from(ACCRUAL_START_DATE, tenor, generator, NOTIONAL, RATE);
    final ZonedDateTime endDate = ScheduleCalculator.getAdjustedDate(ACCRUAL_START_DATE, tenor, generator.getBusinessDayConvention(), CALENDAR, generator.isEndOfMonth());
    final double accrual = generator.getDayCount().getDayCountFraction(ACCRUAL_START_DATE, endDate);
    final CouponFixedDefinition cpnExpected = new CouponFixedDefinition(generator.getCurrency(), endDate, ACCRUAL_START_DATE, endDate, accrual, NOTIONAL, RATE);
    assertEquals("CouponFixedDefinition: from deposit generator", cpnExpected, cpnFixed);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.instrument.index.generator.USDDeposit

    assertEquals("Generator Deposit: getter", IS_EOM, GENERATOR_DEPOSIT_USD.isEndOfMonth());
  }

  @Test
  public void usdDeposit() {
    final GeneratorDeposit preDefined = new USDDeposit(CALENDAR);
    assertEquals("Generator Deposit: getter", CUR, preDefined.getCurrency());
    assertEquals("Generator Deposit: getter", CALENDAR, preDefined.getCalendar());
    assertEquals("Generator Deposit: getter", SETTLEMENT_DAYS, preDefined.getSpotLag());
    assertEquals("Generator Deposit: getter", DAY_COUNT, preDefined.getDayCount());
    assertEquals("Generator Deposit: getter", BUSINESS_DAY, preDefined.getBusinessDayConvention());
    assertEquals("Generator Deposit: getter", IS_EOM, preDefined.isEndOfMonth());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.