Package com.opengamma.analytics.financial.instrument

Examples of com.opengamma.analytics.financial.instrument.Convention


  @Override
  public InstrumentDefinition<?> visitCDSSecurity(final CDSSecurity cds) {

    // TODO: Does convention name matter? ISDA code never uses it
    final Calendar calendar = CalendarUtils.getCalendar(_holidaySource, cds.getCurrency());
    final Convention convention = new Convention(
      cds.getSettlementDays(), cds.getDayCount(), cds.getBusinessDayConvention(), calendar, cds.getName() + "_convention"); // TODO: Is convention name important?

    final ISDACDSPremiumDefinition premiumPayments = ISDACDSPremiumDefinition.from(
      cds.getStartDate(), cds.getMaturity(), cds.getPremiumFrequency(),
      convention, cds.getStubType(), PROTECT_START,
View Full Code Here


  @SuppressWarnings("deprecation")
  public TestResult runTestCase(final ISDATestGridRow testCase, final ISDACurve discountCurve) {

    final BusinessDayConvention businessDays = new FollowingBusinessDayConvention();
    final Calendar calendar = new MondayToFridayCalendar("TestCalendar");
    final Convention convention = new Convention(3, dayCount, businessDays, calendar, "");
    final TemporalAdjuster adjuster = businessDays.getTemporalAdjuster(calendar);

    final ZonedDateTime pricingDate = testCase.getTradeDate().atStartOfDay(ZoneOffset.UTC);
    final ZonedDateTime maturity = testCase.getMaturityDate().atStartOfDay(ZoneOffset.UTC);
View Full Code Here

    final Calendar calendar = new MondayToFridayCalendar("TestCalendar");

    final DayCount dayCount = new ActualThreeSixty();
    final BusinessDayConvention businessDays = new FollowingBusinessDayConvention();
    final Convention convention = new Convention(settlementDays, dayCount, businessDays, calendar, "");

    final StubType stubType = StubType.SHORT_START;

    // Include the accrued coupon (for a default that occurs between coupon dates)
    final boolean accrualOnDefault = true;
View Full Code Here

    final Frequency premiumFrequency = SimpleFrequency.QUARTERLY;
    final Calendar calendar = new MondayToFridayCalendar("TestCalendar");
    final DayCount dayCount = new ActualThreeSixty();
    final BusinessDayConvention businessDays = new FollowingBusinessDayConvention();
    final Convention convention = new Convention(settlementDays, dayCount, businessDays, calendar, "");
    final StubType stubType = StubType.SHORT_START;

    final ISDACDSPremiumDefinition premiumDefinition = ISDACDSPremiumDefinition.from(startDate, maturity, premiumFrequency, convention, stubType, /* protectStart */ true, notional, spread, Currency.EUR, calendar);

    return new ISDACDSDefinition(startDate, maturity, premiumDefinition, notional, spread, recoveryRate, /* accrualOnDefault */ true, /* payOnDefault */ true, /* protectStart */ true, premiumFrequency, convention, stubType);
View Full Code Here

    final Frequency couponFrequency = SimpleFrequency.QUARTERLY;
    final Calendar calendar = new MondayToFridayCalendar("TestCalendar");
    final DayCount dayCount = new ActualThreeSixty();
    final BusinessDayConvention businessDays = new FollowingBusinessDayConvention();
    final Convention convention = new Convention(settlementDays, dayCount, businessDays, calendar, "");
    final StubType stubType = StubType.SHORT_START;

    final ISDACDSPremiumDefinition premiumDefinition = ISDACDSPremiumDefinition.from(startDate, maturity, couponFrequency, convention, stubType, /* protectStart */ true, notional, spread, Currency.EUR, calendar);

    return new ISDACDSDefinition(startDate, maturity, premiumDefinition, notional, spread, recoveryRate, /* accrualOnDefault */ true, /* payOnDefault */ true, /* protectStart */ true, couponFrequency, convention, stubType);
View Full Code Here

    final Frequency couponFrequency = SimpleFrequency.QUARTERLY;
    final Calendar calendar = new MondayToFridayCalendar("TestCalendar");
    final DayCount dayCount = new ActualThreeSixty();
    final BusinessDayConvention businessDays = new FollowingBusinessDayConvention();
    final Convention convention = new Convention(settlementDays, dayCount, businessDays, calendar, "");
    final StubType stubType = StubType.SHORT_START;

    final ISDACDSPremiumDefinition premiumDefinition = ISDACDSPremiumDefinition.from(startDate, maturity, couponFrequency, convention, stubType, /* protectStart */ true, notional, spread, Currency.EUR, calendar);

    return new ISDACDSDefinition(startDate, maturity, premiumDefinition, notional, spread, recoveryRate, /* accrualOnDefault */ true, /* payOnDefault */ true, /* protectStart */ true, couponFrequency, convention, stubType);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.instrument.Convention

Copyright © 2018 www.massapicom. 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.