Examples of QuotedSpread


Examples of com.opengamma.analytics.financial.credit.creditdefaultswap.pricing.vanilla.isdanew.QuotedSpread

                             ISDACompliantYieldCurve yieldCurve,
                             ZonedDateTime[] times, double[] marketSpreads, CDSAnalytic analytic, double fracBump) {
    double cs01;
    if (definition instanceof StandardCreditDefaultSwapDefinition) {
      StandardCreditDefaultSwapDefinition cds = (StandardCreditDefaultSwapDefinition) definition;
      cs01 = CALCULATOR.parallelCS01(analytic, new QuotedSpread(cds.getQuotedSpread() * 1e-4, getCoupon(cds.getPremiumLegCoupon())), yieldCurve, fracBump);
    } else if (definition instanceof LegacyCreditDefaultSwapDefinition) {
      final CDSAnalyticFactory analyticFactory = new CDSAnalyticFactory(definition.getRecoveryRate(), definition.getCouponFrequency().getPeriod())
          .with(definition.getBusinessDayAdjustmentConvention())
          .with(definition.getCalendar()).with(definition.getStubType())
          .withAccualDCC(definition.getDayCountFractionConvention());
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.creditdefaultswap.pricing.vanilla.isdanew.QuotedSpread

    } else {
      throw new OpenGammaRuntimeException("Unknown quote type " + quote);
    }
    // SELL protection reverses directions of legs
    quotedSpread = Double.valueOf(buySellProtection == BuySellProtection.SELL ? -quotedSpread : quotedSpread);
    return new QuotedSpread(quote.getCoupon(), quotedSpread);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.creditdefaultswap.pricing.vanilla.isdanew.QuotedSpread

    final CDSQuoteConvention quote = SpreadCurveFunctions.getQuotes(security.getMaturityDate(),
                                                                    new double[]{cdsQuoteDouble},
                                                                    security.getParSpread(),
                                                                    quoteConvention,
                                                                    true)[0];
    final QuotedSpread quotedSpread = getQuotedSpread(quote,
                                                      security.isBuy() ? BuySellProtection.BUY : BuySellProtection.SELL,
                                                      yieldCurve,
                                                      pricingCDS,
                                                      security.getParSpread());
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.creditdefaultswap.pricing.vanilla.isdanew.QuotedSpread

    } else {
      quotedSpread = POINTS_UP_FRONT_CONVERTER.pufToQuotedSpread(analytic, puf.getCoupon(), yieldCurve, puf.getPointsUpFront());
    }
    // SELL protection reverses directions of legs
    quotedSpread = (buySellProtection == BuySellProtection.SELL) ? -quotedSpread : quotedSpread;
    return new QuotedSpread(quote.getCoupon(), quotedSpread);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.creditdefaultswap.pricing.vanilla.isdanew.QuotedSpread

    if (normalise) {
      multiplier = StandardCDSQuotingConvention.POINTS_UPFRONT.equals(quoteConvention) ? s_tenminus2 : s_tenminus4;
    }
    for (int i = 0; i < values.length; i++) {
      if (StandardCDSQuotingConvention.SPREAD.equals(quoteConvention)) {
        result[i] = IMMDateGenerator.isIMMDate(pricedCDSMaturity) ? new QuotedSpread(coupon * s_tenminus4, values[i] * multiplier) : new ParSpread(values[i] * multiplier);
      } else if (StandardCDSQuotingConvention.POINTS_UPFRONT.equals(quoteConvention)) {
        result[i] = new PointsUpFront(coupon * s_tenminus4, values[i] * multiplier);
      } else {
        throw new OpenGammaRuntimeException("Unsupported quote type: " + quoteConvention);
      }
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.