Examples of replaceCurve()


Examples of com.opengamma.analytics.financial.provider.description.interestrate.MulticurveProviderDiscount.replaceCurve()

    final double[] rSpread = new double[R1.length];
    for (int i = 0; i < rSpread.length; i++) {
      rSpread[i] = R1[i] + zSpread + eps;
    }
    final MulticurveProviderDiscount multicurves = new MulticurveProviderDiscount(MULTI_CURVES.copy());
    multicurves.replaceCurve(Currency.EUR, YieldCurve.from(InterpolatedDoublesCurve.from(T, rSpread, INTERPOLATOR)));
    final double newPrice = PAYMENTS.accept(PV_CALCULATOR, multicurves).getAmount(Currency.EUR);
    assertEquals((newPrice - price) / eps, CALCULATOR.calculatePriceSensitivityToZSpread(PAYMENTS, MULTI_CURVES, zSpread), eps);
  }

  @Test
View Full Code Here

Examples of com.opengamma.analytics.financial.provider.description.interestrate.MulticurveProviderDiscount.replaceCurve()

    final double[][] rateAA = new double[nbLevel][nbStart];
    final double[][] rateAAApprox = new double[nbLevel][nbStart];

    for (int looplevel = 0; looplevel < nbLevel; looplevel++) {
      curveCst = YieldCurve.from(ConstantDoublesCurve.from(rateLevel[looplevel], "CST"));
      multicurvesCst.replaceCurve(FEDFUND, curveCst);

      for (int loopstart = 0; loopstart < nbStart; loopstart++) {
        effectiveDate[loopstart] = ScheduleCalculator.getAdjustedDate(effectiveDate[0], step.multipliedBy(loopstart), USDLIBOR3M, NYC);
        final ZonedDateTime endDate = ScheduleCalculator.getAdjustedDate(effectiveDate[loopstart], TENOR_3M, USDLIBOR3M, NYC);
        final CouponArithmeticAverageONDefinition cpnONDefinition = CouponArithmeticAverageONDefinition.from(FEDFUND, effectiveDate[loopstart], endDate, NOTIONAL, 0, NYC);
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.