Package com.opengamma.analytics.financial.interestrate

Examples of com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity.cleaned()


      }
    }
    InterestRateCurveSensitivity sensiBond = METHOD_BOND.dirtyPriceCurveSensitivity(BASKET[minIndex], CURVES);
    sensiBond = sensiBond.multipliedBy(1.0 / CONVERSION_FACTOR[minIndex]);
    sensiFuture = sensiFuture.cleaned();
    sensiBond = sensiBond.cleaned();
    for (int loopsensi = 0; loopsensi < sensiFuture.getSensitivities().get(CREDIT_CURVE_NAME).size(); loopsensi++) {
      assertEquals("Bond future security Discounting Method: curve sensitivity " + loopsensi, sensiBond.getSensitivities().get(CREDIT_CURVE_NAME).get(loopsensi).first, sensiFuture.getSensitivities()
          .get(CREDIT_CURVE_NAME).get(loopsensi).first, 1.0E-10);
      assertEquals("Bond future security Discounting Method: curve sensitivity " + loopsensi, sensiBond.getSensitivities().get(CREDIT_CURVE_NAME).get(loopsensi).second, sensiFuture.getSensitivities()
          .get(CREDIT_CURVE_NAME).get(loopsensi).second, 1.0E-10);
View Full Code Here


    assertEquals(pvsLongPayer.getSensitivities(), pvscLongPayer);
    // Present value sensitivity comparison with finite difference.
    final double deltaTolerance = 1E+2; //Sensitivity is for a movement of 1. 1E+2 = 1 cent for a 1 bp move.
    final double deltaShift = 1e-9;
    InterestRateCurveSensitivity pvsSwapPayer = new InterestRateCurveSensitivity(SWAP_PAYER.accept(PVSC, sabrBundle));
    pvsSwapPayer = pvsSwapPayer.cleaned();
    InterestRateCurveSensitivity sensi = new InterestRateCurveSensitivity(pvscLongPayer);
    sensi = sensi.cleaned();
    final double pv = SWAPTION_LONG_PAYER.accept(PVC, sabrBundle);
    // 1. Forward curve sensitivity
    final String bumpedCurveName = "Bumped Curve";
View Full Code Here

    final double deltaTolerance = 1E+2; //Sensitivity is for a movement of 1. 1E+2 = 1 cent for a 1 bp move.
    final double deltaShift = 1e-9;
    InterestRateCurveSensitivity pvsSwapPayer = new InterestRateCurveSensitivity(SWAP_PAYER.accept(PVSC, sabrBundle));
    pvsSwapPayer = pvsSwapPayer.cleaned();
    InterestRateCurveSensitivity sensi = new InterestRateCurveSensitivity(pvscLongPayer);
    sensi = sensi.cleaned();
    final double pv = SWAPTION_LONG_PAYER.accept(PVC, sabrBundle);
    // 1. Forward curve sensitivity
    final String bumpedCurveName = "Bumped Curve";
    final String[] bumpedCurvesForwardName = {FUNDING_CURVE_NAME, bumpedCurveName };
    final SwaptionCashFixedIbor swaptionBumpedForward = SWAPTION_DEFINITION_LONG_PAYER.toDerivative(REFERENCE_DATE, bumpedCurvesForwardName);
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.