startTime = System.currentTimeMillis();
for (int looptest = 0; looptest < nbTest; looptest++) {
final G2ppPiecewiseConstantParameters g2Parameters = new G2ppPiecewiseConstantParameters(meanReversion, new double[][] { {0.01}, {0.01 / ratio}}, new double[0], correlation);
final SwaptionPhysicalG2ppCalibrationObjective objective = new SwaptionPhysicalG2ppCalibrationObjective(g2Parameters, ratio);
final SuccessiveRootFinderCalibrationEngine calibrationEngine = new SwaptionPhysicalG2ppSuccessiveRootFinderCalibrationEngine(objective);
for (int loopexp = 0; loopexp < EXPIRY_TENOR.length; loopexp++) {
calibrationEngine.addInstrument(SWAPTION_LONG_PAYER[loopexp], METHOD_SABR);
}
calibrationEngine.calibrate(SABR_BUNDLE);
pv[looptest] = METHOD_G2PP.presentValue(SWAPTION_LONG_PAYER[EXPIRY_TENOR.length - 1], objective.getG2Bundle());
}
endTime = System.currentTimeMillis();
System.out.println(nbTest + " Hull-White calibration to swaption (5 swaptions) + price: " + (endTime - startTime) + " ms");
// Performance note: calibration: 12-Dec-2012: On Mac Pro 3.2 GHz Quad-Core Intel Xeon: 135 ms for 100 calibration with 5 swaptions.