Package com.opengamma.financial.convention

Examples of com.opengamma.financial.convention.StubType


    final Period paymentPeriod = convention.getPaymentTenor().getPeriod();
    final boolean eomLeg = convention.isIsEOM();
    final BusinessDayConvention businessDayConvention = convention.getBusinessDayConvention();
    final int paymentLag = convention.getPaymentLag();
    final ZonedDateTime startDate = ScheduleCalculator.getAdjustedDate(spotDateLeg, swapNode.getStartTenor().getPeriod(), businessDayConvention, calendar, eomLeg);
    final StubType stub = convention.getStubType();
    final ZonedDateTime maturityDate = startDate.plus(maturityTenor);
    if (isMarketDataSpread) {
      final Double spread = _marketData.getDataPoint(_dataId);
      if (spread == null) {
        throw new OpenGammaRuntimeException("Could not get market data for " + _dataId);
View Full Code Here


    final RestructuringClause restructuringClause = RestructuringClause.NONE;
    final ExternalId regionId = region();
    final ZonedDateTime startDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().minusMonths(5);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(6);
    final StubType stubType = stubType();
    final Frequency couponFrequency = frequency();
    final DayCount dayCount = dayCount();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean immAdjustMaturityDate = bool();
    final boolean adjustEffectiveDate = bool();
View Full Code Here

    final RestructuringClause restructuringClause = RestructuringClause.NONE;
    final ExternalId regionId = region();
    final ZonedDateTime startDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().minusMonths(5);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(6);
    final StubType stubType = stubType();
    final Frequency couponFrequency = frequency();
    final DayCount dayCount = dayCount();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean immAdjustMaturityDate = bool();
    final boolean adjustEffectiveDate = bool();
View Full Code Here

    final RestructuringClause restructuringClause = RestructuringClause.NONE;
    final ExternalId regionId = region();
    final ZonedDateTime startDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().minusMonths(5);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(6);
    final StubType stubType = stubType();
    final Frequency couponFrequency = frequency();
    final DayCount dayCount = dayCount();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean immAdjustMaturityDate = bool();
    final boolean adjustEffectiveDate = bool();
View Full Code Here

    final RestructuringClause restructuringClause = RestructuringClause.NONE;
    final ExternalId regionId = region();
    final ZonedDateTime startDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().minusMonths(5);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(6);
    final StubType stubType = stubType();
    final Frequency couponFrequency = frequency();
    final DayCount dayCount = dayCount();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean immAdjustMaturityDate = bool();
    final boolean adjustEffectiveDate = bool();
View Full Code Here

    final RestructuringClause restructuringClause = RestructuringClause.NONE;
    final ExternalId regionId = region();
    final ZonedDateTime startDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().minusMonths(5);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(6);
    final StubType stubType = stubType();
    final Frequency couponFrequency = frequency();
    final DayCount dayCount = dayCount();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean immAdjustMaturityDate = bool();
    final boolean adjustEffectiveDate = bool();
View Full Code Here

    final RestructuringClause restructuringClause = RestructuringClause.NONE;
    final ExternalId regionId = region();
    final ZonedDateTime startDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().minusMonths(5);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(6);
    final StubType stubType = stubType();
    final Frequency couponFrequency = frequency();
    final DayCount dayCount = dayCount();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean immAdjustMaturityDate = bool();
    final boolean adjustEffectiveDate = bool();
View Full Code Here

      final ExternalIdBundle externalIdBundle = deserializer.fieldValueToObject(ExternalIdBundle.class, message.getByName(EXTERNAL_ID_BUNDLE_FIELD));
      final ExternalId swapIndexConvention = deserializer.fieldValueToObject(ExternalId.class, message.getByName(IBOR_INDEX_ID_FIELD));
      final Tenor paymentTenor = Tenor.of(Period.parse(message.getString(PAYMENT_TENOR_FIELD)));
      final CompoundingType compoundingType = CompoundingType.valueOf(message.getString(COMPOUNDING_TYPE_FIELD));
      final Tenor compositionTenor = Tenor.of(Period.parse(message.getString(COMPOSITION_TENOR_FIELD)));
      final StubType stubTypeCompound = StubType.valueOf(message.getString(STUB_TYPE_COMPOUND_FIELD));
      final int settlementDays = message.getInt(SETTLEMENT_DAYS_FIELD);
      final boolean isEOM = message.getBoolean(IS_EOM_FIELD);
      final StubType stubTypeLeg = StubType.valueOf(message.getString(STUB_TYPE_LEG_FIELD));
      final boolean exchangeNotional = message.getBoolean(EXCHANGE_NOTIONAL_FIELD);
      final int paymentLag = message.getInt(PAYMENT_LAG_FIELD);
      final CompoundingIborLegConvention convention = new CompoundingIborLegConvention(name, externalIdBundle, swapIndexConvention, paymentTenor,
          compoundingType, compositionTenor, stubTypeCompound, settlementDays, isEOM, stubTypeLeg, exchangeNotional, paymentLag);
      final FudgeField uniqueIdMsg = message.getByName(UNIQUE_ID_FIELD);
View Full Code Here

    final double recoveryRate = testCase.getRecoveryRate();

    // Assume 1 billion notional, quarterly premiums and ACT360 day count
    final double notional = 1000000000;
    final Frequency couponFrequency = SimpleFrequency.QUARTERLY;
    final StubType stubType = StubType.SHORT_START;

    // Now build the CDS object
    final ISDACDSPremiumDefinition premiumDefinition = ISDACDSPremiumDefinition.from(startDate, maturity, couponFrequency, convention, stubType, /* protect start */ true, /*notional*/ 1.0, spread, Currency.EUR, calendar);
    final ISDACDSDefinition cdsDefinition = new ISDACDSDefinition(startDate, maturity, premiumDefinition, /*notional*/1.0, spread, recoveryRate, /* accrualOnDefault */ true, /* payOnDefault */ true, /* protectStart */ true, couponFrequency, convention, stubType);
    final ISDACDSDerivative cds = cdsDefinition.toDerivative(pricingDate, stepinDate, settlementDate, "IR_CURVE");
View Full Code Here

    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;

    // Pay contingent leg on default or at maturity?
View Full Code Here

TOP

Related Classes of com.opengamma.financial.convention.StubType

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.