Package com.opengamma.analytics.financial.credit.bumpers

Examples of com.opengamma.analytics.financial.credit.bumpers.RecoveryRateBumpType


  }

  public static double getRR01(CreditDefaultSwapDefinition definition,
                         ISDACompliantYieldCurve yieldCurve,
                         ValueProperties properties, ISDACompliantCreditCurve hazardCurve, CDSAnalytic analytic) {
    final RecoveryRateBumpType recoveryRateBumpType =
        RecoveryRateBumpType.valueOf(Iterables.getOnlyElement(properties.getValues(
            CreditInstrumentPropertyNamesAndValues.PROPERTY_RECOVERY_RATE_BUMP_TYPE)));
    if (recoveryRateBumpType != RecoveryRateBumpType.ADDITIVE) {
      throw new UnsupportedOperationException("Only Additive rr01 sensitivity supported currently. Got " + recoveryRateBumpType);
    }
View Full Code Here


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

    // Define the market data to calibrate to

    // The type of recovery rate bump to apply
    final RecoveryRateBumpType recoveryRateBumpType = RecoveryRateBumpType.ADDITIVE;

    // The number of CDS instruments used to calibrate against
    final int numberOfCalibrationCDS = 8;

    // The flat (unbumped) spread
View Full Code Here

  @Override
  protected Set<ComputedValue> getComputedValue(final CreditDefaultSwapOptionDefinition definition, final ISDADateCurve yieldCurve, final double vol,
      final ZonedDateTime[] calibrationTenors, final double[] marketSpreads, final HazardRateCurve hazardRateCurve, final ZonedDateTime valuationTime,
      final ComputationTarget target, final ValueProperties properties) {
    final Double recoveryRateCurveBump = Double.valueOf(Iterables.getOnlyElement(properties.getValues(CreditInstrumentPropertyNamesAndValues.PROPERTY_RECOVERY_RATE_CURVE_BUMP)));
    final RecoveryRateBumpType recoveryRateBumpType =
        RecoveryRateBumpType.valueOf(Iterables.getOnlyElement(properties.getValues(CreditInstrumentPropertyNamesAndValues.PROPERTY_RECOVERY_RATE_BUMP_TYPE)));
    final double rr01 = CALCULATOR.getRecoveryRate01CreditDefaultSwapOption(valuationTime, definition, vol, yieldCurve, hazardRateCurve, calibrationTenors,
        marketSpreads, recoveryRateCurveBump, recoveryRateBumpType);
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.RR01, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, rr01));
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.credit.bumpers.RecoveryRateBumpType

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.