curves1.setCurve(CURVES_NAME[0], CURVES.getCurve(CURVES_NAME[1]));
curves1.setCurve(CURVES_NAME[1], CURVES.getCurve(CURVES_NAME[1]));
final LiborMarketModelDisplacedDiffusionDataBundle bundleLmm1 = new LiborMarketModelDisplacedDiffusionDataBundle(PARAMETERS_LMM, curves1);
final YieldAndDiscountCurve dsc = CURVES.getCurve(CURVES_NAME[1]);
LiborMarketModelMonteCarloMethod methodLmmMc;
methodLmmMc = new LiborMarketModelMonteCarloMethod(new NormalRandomNumberGenerator(0.0, 1.0, new MersenneTwister()), NB_PATH);
final CurrencyAmount pvLastMC = methodLmmMc.presentValue(CAP_LAST, CUR, dsc, bundleLmm1);
final double pvLastPreviousRun = 187362.915; // 12500 paths - 1Y jump
assertEquals("Cap/floor: LMM pricing by Monte Carlo", pvLastPreviousRun, pvLastMC.getAmount(), 1E-2);
final CurrencyAmount pvLastExplicit = METHOD_LMM_CAP.presentValue(CAP_LAST, bundleLmm1);
assertEquals("Cap/floor: LMM pricing by Monte Carlo", pvLastExplicit.getAmount(), pvLastMC.getAmount(), 2.0E+2);
methodLmmMc = new LiborMarketModelMonteCarloMethod(new NormalRandomNumberGenerator(0.0, 1.0, new MersenneTwister()), NB_PATH);
final CurrencyAmount pv6MC = methodLmmMc.presentValue(CAP_6, CUR, dsc, bundleLmm1);
final double pv6PreviousRun = 154023.582; // 12500 paths - 1Y jump
assertEquals("Cap/floor: LMM pricing by Monte Carlo", pv6PreviousRun, pv6MC.getAmount(), 1E-2);
final CurrencyAmount pv6Explicit = METHOD_LMM_CAP.presentValue(CAP_6, bundleLmm1);
assertEquals("Cap/floor: LMM pricing by Monte Carlo", pv6Explicit.getAmount(), pv6MC.getAmount(), 1.25E+3);