Package com.opengamma.analytics.financial.credit

Examples of com.opengamma.analytics.financial.credit.StubType


    final String name = tokens[0];
    final ExternalId reference = ExternalId.of(tokens[1], name);
    final BusinessDayConvention badDayConvention = BusinessDayConventionFactory.of(tokens[2]);
    final DayCount dayCount = DayCountFactory.of(tokens[3]);
    final Period couponFrequency = Period.parse(tokens[4]);
    final StubType stubType = StubType.valueOf(tokens[5]);
    return new SingleNameIdentifiable(name, reference, badDayConvention, dayCount, couponFrequency, stubType);
  }
View Full Code Here


    final boolean includeAccruedPremium = security.isIncludeAccruedPremium();
    final boolean protectionStart = security.isProtectionStart();
    final double quotedSpread = security.getQuotedSpread();
    final StandardCDSCoupon premiumLegCoupon = getCoupon(security.getCoupon());
    final double upFrontAmount = security.getUpfrontAmount().getAmount();
    final StubType stubType = security.getStubType().toAnalyticsType();
    final ZonedDateTime cashSettlementDate = security.getCashSettlementDate();
    final boolean adjustCashSettlementDate = security.isAdjustCashSettlementDate();
    final double coupon = security.getCoupon();
    final com.opengamma.analytics.financial.credit.obligor.definition.Obligor protectionBuyer = getObligorForProtectionBuyer(security.getProtectionBuyer());
    final com.opengamma.analytics.financial.credit.obligor.definition.Obligor protectionSeller = getObligorForProtectionSeller(security.getProtectionSeller());
View Full Code Here

    final DebtSeniority debtSeniority = security.getDebtSeniority();
    final RestructuringClause restructuringClause = security.getRestructuringClause();
    final double amount = notional.getAmount();
    final boolean includeAccruedPremium = security.isIncludeAccruedPremium();
    final boolean protectionStart = security.isProtectionStart();
    final StubType stubType = security.getStubType().toAnalyticsType();
    final double parSpread = security.getParSpread();
    final com.opengamma.analytics.financial.credit.obligor.definition.Obligor protectionBuyer = getObligorForProtectionBuyer(security.getProtectionBuyer());
    final com.opengamma.analytics.financial.credit.obligor.definition.Obligor protectionSeller = getObligorForProtectionSeller(security.getProtectionSeller());
    final com.opengamma.analytics.financial.credit.obligor.definition.Obligor referenceEntity = getObligorForReferenceEntity(security.getReferenceEntity());
    return new LegacyVanillaCreditDefaultSwapDefinition(buySellProtection, protectionBuyer, protectionSeller, referenceEntity, currency,
View Full Code Here

    final boolean includeAccruedPremium = security.isIncludeAccruedPremium();
    final boolean protectionStart = security.isProtectionStart();
    final double quotedSpread = security.getQuotedSpread();
    final StandardCDSCoupon premiumLegCoupon = getCoupon(security.getCoupon());
    final double upFrontAmount = security.getUpfrontAmount().getAmount();
    final StubType stubType = security.getStubType().toAnalyticsType();
    final ZonedDateTime cashSettlementDate = security.getCashSettlementDate();
    final boolean adjustCashSettlementDate = security.isAdjustCashSettlementDate();
    final double coupon = security.getCoupon();
    return new LegacyVanillaCreditDefaultSwapDefinition(buySellProtection, DUMMY_OBLIGOR_A, DUMMY_OBLIGOR_B, DUMMY_OBLIGOR_C, currency,
        debtSeniority, restructuringClause, calendar, startDate, effectiveDate, maturityDate, stubType,
View Full Code Here

    final RestructuringClause restructuringClause = security.getRestructuringClause();
    final double amount = notional.getAmount();
    final double recoveryRate = _recoveryRate;
    final boolean includeAccruedPremium = security.isIncludeAccruedPremium();
    final boolean protectionStart = security.isProtectionStart();
    final StubType stubType = security.getStubType().toAnalyticsType();
    final double parSpread = security.getParSpread();
    return new LegacyVanillaCreditDefaultSwapDefinition(buySellProtection, DUMMY_OBLIGOR_A, DUMMY_OBLIGOR_B, DUMMY_OBLIGOR_C, currency,
        debtSeniority, restructuringClause, calendar, startDate, effectiveDate, maturityDate, stubType,
        couponFrequency, dayCount, businessDayConvention, immAdjustMaturityDate, adjustEffectiveDate, adjustMaturityDate,
        amount, recoveryRate, includeAccruedPremium, protectionStart, parSpread);
View Full Code Here

    final ZonedDateTime startDate = cds.getStartDate();
    final ZonedDateTime endDate = cds.getMaturityDate();

    final boolean protectStart = cds.getProtectionStart();

    final StubType stubType = cds.getStubType();

    // ------------------------------------------------

    // TODO : Check this logic
    /*
 
View Full Code Here

    // -------------------------------------------------------------------------------

    final ZonedDateTime startDate = cds.getStartDate();

    // Get the coupon stub type
    final StubType stubType = cds.getStubType();

    // Get the coupon frequency
    final PeriodFrequency couponFrequency = cds.getCouponFrequency();

    // Compute the number of cashflows in the premium leg schedule (based on the adjusted effective and maturity dates and the coupon frequency and stub type)
View Full Code Here

  @Test
  public void Test() {
    final Period tenor = Period.ofMonths(3);
    final boolean payAccOnDefault = true;
    final StubType stubType = StubType.FRONTSHORT;
    final boolean protectionStart = true;

    final double quotedSpread = 550. / 10000;
    final double coupon = 500. / 10000;
    final double recovery = 0.4;
View Full Code Here

      final LocalDate stepinDate = today.plusDays(1); // aka effective date
      final LocalDate valueDate = addWorkDays(today, 3, DEFAULT_CALENDAR); // 3 working days on
      final LocalDate startDate = res.startDate;
      final LocalDate endDate = res.endDate;
      final Period tenor = Period.ofMonths(3); // TODO should be part of the CSV
      final StubType stubType = StubType.FRONTSHORT; // TODO ditto
      final boolean protectionStart = true; // TODO ditto

      // build an 'analytic' cds, then price with the new date free pricer
      double protectionLeg_new = 0;
      double premLeg_clean_new = 0;
View Full Code Here

  @Test(enabled = false)
  public void creditCurvePeturbTest() {
    System.out.println("CalibrationTimingTest - set enabled=false before push");
    final ISDACompliantYieldCurve yieldCurve = ISDACompliantYieldCurveBuild.build(SPOTDATE, YC_INST_TYPES, YC_INST_TENOR, YC_MARKET_RATES, ACT360, D30360, SWAP_INTERVAL, ACT365, MOD_FOLLOWING);
    final Period tenor = Period.ofMonths(3);
    final StubType stubType = StubType.FRONTSHORT;
    final boolean payAccOndefault = true;
    final boolean protectionStart = true;
    final double recovery = 0.4;

    final double[] coupons = new double[NUM_CREDIT_CURVE_POINTS];
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.credit.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.