Examples of UnderlyingPool


Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

    // Calculate the unbumped value of the index
    final double presentValue = indexPresentValue.getIntrinsicPresentValueIndexCreditDefaultSwap(valuationDate, indexCDS, breakevenSpreads, yieldCurves, hazardRateCurves);

    // Extract out the underlying pool from the index CDS
    UnderlyingPool modifiedPool = indexCDS.getUnderlyingPool();

    double[] recoveryRates = modifiedPool.getRecoveryRates();

    //final double recoveryRate = modifiedPool.getRecoveryRates()[i];

    final double[] bumpedRecoveryRates = recoveryRateBumper.getBumpedRecoveryRate(recoveryRates, recoveryRateBump, recoveryRateBumpType);

    // Modify the temp pool object to have the bumped recovery rate vector
    modifiedPool = modifiedPool.withRecoveryRates(bumpedRecoveryRates);

    // Construct a temporary index CDS
    IndexCreditDefaultSwapDefinition tempIndex = indexCDS;

    // Modify the temporary index to have the modified underlying pool
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

    for (int i = 0; i < numberOfObligors; i++) {

      // TODO : Suspect there is a bug here in how the recovery rate is being bumped

      // Extract out the underlying pool from the index CDS
      UnderlyingPool modifiedPool = indexCDS.getUnderlyingPool();

      double[] bumpedRecoveryRates = modifiedPool.getRecoveryRates();

      final double recoveryRate = modifiedPool.getRecoveryRates()[i];

      bumpedRecoveryRates[i] = recoveryRateBumper.getBumpedRecoveryRate(recoveryRate, recoveryRateBump, recoveryRateBumpType);

      // Modify the temp pool object to have the bumped recovery rate vector
      modifiedPool = modifiedPool.withRecoveryRates(bumpedRecoveryRates);

      // Construct a temporary index CDS
      IndexCreditDefaultSwapDefinition tempIndex = indexCDS;

      // Modify the temporary index to have the modified underlying pool
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullPoolNameField() {

    new UnderlyingPool(null, obligors, currency, debtSeniority, restructuringClause, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullObligorsField() {

    new UnderlyingPool(poolName, null, currency, debtSeniority, restructuringClause, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullCurrencyField() {

    new UnderlyingPool(poolName, obligors, null, debtSeniority, restructuringClause, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullDebtSeniorityField() {

    new UnderlyingPool(poolName, obligors, currency, null, restructuringClause, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullRestructuringClauseField() {

    new UnderlyingPool(poolName, obligors, currency, debtSeniority, null, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullCreditSpreadTenorsField() {

    new UnderlyingPool(poolName, obligors, currency, debtSeniority, restructuringClause, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullCreditSpreadTermStructuresField() {

    new UnderlyingPool(poolName, obligors, currency, debtSeniority, restructuringClause, notionals, coupons, recoveryRates, obligorWeights);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.credit.underlyingpool.definition.UnderlyingPool

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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullNotionalsField() {

    new UnderlyingPool(poolName, obligors, currency, debtSeniority, restructuringClause, null, coupons, recoveryRates, obligorWeights);
  }
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.