Examples of OvernightIndexConvention


Examples of com.opengamma.financial.convention.OvernightIndexConvention

              final int spotLag = iborIndexConvention.getSettlementDays();
              iborIndex.add(new IborIndex(iborIndexConvention.getCurrency(), ibor.getTenor().getPeriod(), spotLag, iborIndexConvention.getDayCount(),
                  iborIndexConvention.getBusinessDayConvention(), iborIndexConvention.isIsEOM(), iborIndexConvention.getName()));
            } else if (type instanceof OvernightCurveTypeConfiguration) {
              final OvernightCurveTypeConfiguration overnight = (OvernightCurveTypeConfiguration) type;
              final OvernightIndexConvention overnightConvention = conventionSource.getConvention(OvernightIndexConvention.class, overnight.getConvention());
              if (overnightConvention == null) {
                throw new OpenGammaRuntimeException("Overnight convention called " + overnight.getConvention() + " was null");
              }
              overnightIndex.add(new IndexON(overnightConvention.getName(), overnightConvention.getCurrency(), overnightConvention.getDayCount(), overnightConvention.getPublicationLag()));
            } else {
              throw new OpenGammaRuntimeException("Cannot handle " + type.getClass());
            }
          } // type - end
          if (!iborIndex.isEmpty()) {
View Full Code Here

Examples of com.opengamma.financial.convention.OvernightIndexConvention

    final ExternalId liborConventionId = ExternalId.of(SCHEME_NAME, liborConventionName);
    final ExternalId overnightConventionId = ExternalId.of(SCHEME_NAME, overnightConventionName);
    final ExternalId priceIndexId = ExternalId.of(SCHEME_NAME, priceIndexName);
    final Convention liborConvention = new IborIndexConvention(liborConventionName, getIds(Currency.USD, LIBOR), ACT_360, MODIFIED_FOLLOWING, 2, true, Currency.USD,
        LocalTime.of(11, 00), "US", NYLON, US, "");
    final Convention overnightConvention = new OvernightIndexConvention(overnightConventionName, getIds(Currency.USD, OVERNIGHT), ACT_360, 1, Currency.USD, US);
   
    // Deposit
    final DepositConvention depositConvention = new DepositConvention(depositConventionName, getIds(Currency.USD, DEPOSIT), ACT_360, MODIFIED_FOLLOWING, 2, true, Currency.USD, US);
    final DepositConvention depositONConvention = new DepositConvention(depositONConventionName, getIds(Currency.USD, DEPOSIT_ON), ACT_360, FOLLOWING, 0, false, Currency.USD, US);
   
View Full Code Here

Examples of com.opengamma.financial.convention.OvernightIndexConvention

  public static synchronized void addFixedIncomeInstrumentConventions(final InMemoryConventionMaster conventionMaster) {
    // Index Overnight
    final String onIndexName = getConventionName(Currency.AUD, OVERNIGHT);
    final ExternalId onIndexId = ExternalId.of(SCHEME_NAME, onIndexName);
    final Convention onIndex = new OvernightIndexConvention(onIndexName, getIds(Currency.AUD, OVERNIGHT), ACT_365, 0, Currency.AUD, AU);
    // Index BBSW
    final String bbswConventionName = getConventionName(Currency.AUD, BBSW);
    final Convention bbswIndex = new IborIndexConvention(bbswConventionName, getIds(Currency.AUD, BBSW), ACT_365, MODIFIED_FOLLOWING, 2, true, Currency.AUD,
        LocalTime.of(11, 00), "AU", AU, AU, "");
    final ExternalId bbswConventionId = ExternalId.of(SCHEME_NAME, bbswConventionName);
View Full Code Here

Examples of com.opengamma.financial.convention.OvernightIndexConvention

    assertEquals(convention, cycleObject(OISLegConvention.class, convention));
  }

  @Test
  public void testOvernightIndexConvention() {
    final OvernightIndexConvention convention = new OvernightIndexConvention("EONIA", ExternalIdBundle.of(InMemoryConventionBundleMaster.simpleNameSecurityId("EONIA")),
        DayCountFactory.INSTANCE.getDayCount("Act/360"), 2, Currency.EUR, ExternalId.of("Test", "EU"));
    convention.setUniqueId(UniqueId.of("Test", "1234"));
    assertEquals(convention, cycleObject(OvernightIndexConvention.class, convention));
  }
View Full Code Here

Examples of com.opengamma.financial.convention.OvernightIndexConvention

   * @return The Fed fund future
   */
  private InstrumentDefinition<?> getFederalFundsFuture(final RateFutureNode rateFuture, final FederalFundsFutureConvention futureConvention,
      final Double price) {
    final String expiryCalculatorName = futureConvention.getExpiryConvention().getValue();
    final OvernightIndexConvention indexConvention = _conventionSource.getConvention(OvernightIndexConvention.class, rateFuture.getUnderlyingConvention());
    if (indexConvention == null) {
      throw new OpenGammaRuntimeException("Underlying convention was null");
    }
    final Currency currency = indexConvention.getCurrency();
    final DayCount dayCount = indexConvention.getDayCount();
    final int publicationLag = indexConvention.getPublicationLag();
    final IndexON index = new IndexON(indexConvention.getName(), currency, dayCount, publicationLag);
    final double paymentAccrualFactor = 1 / 12.;
    final Calendar calendar = CalendarUtils.getCalendar(_regionSource, _holidaySource, indexConvention.getRegionCalendar());
    final ExchangeTradedInstrumentExpiryCalculator expiryCalculator = ExchangeTradedInstrumentExpiryCalculatorFactory.getCalculator(expiryCalculatorName);
    final ZonedDateTime startDate = _valuationTime.plus(rateFuture.getStartTenor().getPeriod());
    final LocalTime time = startDate.toLocalTime();
    final ZoneId timeZone = startDate.getZone();
    final ZonedDateTime expiryDate = ZonedDateTime.of(expiryCalculator.getExpiryDate(rateFuture.getFutureNumber(), startDate.toLocalDate(), calendar), time, timeZone);
View Full Code Here

Examples of com.opengamma.financial.convention.OvernightIndexConvention

  public static synchronized void addFixedIncomeInstrumentConventions(final InMemoryConventionMaster conventionMaster) {
    // Index (Overnight and Ibor-like)
    final String onIndexName = getConventionName(Currency.EUR, OVERNIGHT);
    final ExternalId onIndexId = ExternalId.of(SCHEME_NAME, onIndexName);
    final Convention onIndex = new OvernightIndexConvention(onIndexName, getIds(Currency.EUR, OVERNIGHT), ACT_360, 0, Currency.EUR, EU);
    final String liborConventionName = getConventionName(Currency.EUR, LIBOR);
    final Convention liborIndex = new IborIndexConvention(liborConventionName, getIds(Currency.EUR, LIBOR), ACT_360, MODIFIED_FOLLOWING, 2, true, Currency.EUR,
        LocalTime.of(11, 00), "EU", EU, EU, "");
    final ExternalId liborConventionId = ExternalId.of(SCHEME_NAME, liborConventionName);
    final String euriborConventionName = getConventionName(Currency.EUR, EURIBOR);
View Full Code Here

Examples of com.opengamma.financial.convention.OvernightIndexConvention

  public static synchronized void addFixedIncomeInstrumentConventions(final InMemoryConventionMaster conventionMaster) {
    final String tenorString = "6M";
    // Index (Overnight and Ibor-like)
    final String onIndexName = getConventionName(Currency.JPY, OVERNIGHT);
    final ExternalId onIndexId = ExternalId.of(SCHEME_NAME, onIndexName);
    final Convention onIndex = new OvernightIndexConvention(onIndexName, getIds(Currency.JPY, OVERNIGHT), ACT_365, 1, Currency.JPY, JP);
    final String iborConventionName = getConventionName(Currency.JPY, LIBOR);
    final Convention liborIndex = new IborIndexConvention(iborConventionName, getIds(Currency.JPY, LIBOR), ACT_360, MODIFIED_FOLLOWING, 2, true, Currency.JPY,
        LocalTime.of(11, 00), "JP", JPGB, JP, "");
    final ExternalId liborConventionId = ExternalId.of(SCHEME_NAME, iborConventionName);
    final Convention tiborJPIndex = new IborIndexConvention(getConventionName(Currency.JPY, TIBOR_JAPANESE), getIds(Currency.JPY, TIBOR_JAPANESE), ACT_365, MODIFIED_FOLLOWING, 2, true, Currency.JPY,
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.