startTime = System.currentTimeMillis();
for (int looptest = 0; looptest < nbTest; looptest++) {
final CouponArithmeticAverageONDefinition ffDefinition = CouponArithmeticAverageONDefinition.from(FEDFUND, ScheduleCalculator.getAdjustedDate(REFERENCE_DATE, TENOR_1Y, USDLIBOR3M, NYC), TENOR_3M,
NOTIONAL, 0, USDLIBOR3M.getBusinessDayConvention(), true, NYC);
final CouponArithmeticAverageON ff = ffDefinition.toDerivative(REFERENCE_DATE);
pvExact = METHOD_FF_EXACT.presentValue(ff, MULTICURVES);
// pvExact = METHOD_FF_EXACT.presentValue(FEDFUND_CPN_3MFWD, MULTICURVES);
}
endTime = System.currentTimeMillis();
System.out.println("CouponArithmeticAverageONDiscountingMethod: " + nbTest + " pv Arithmetic Average ON - Exact: " + (endTime - startTime) + " ms");
// Performance note: AA ON exact pv: 26-Mar-2013: On Mac Pro 3.2 GHz Quad-Core Intel Xeon: 200 ms for 10000 coupons.
// Performance note: AA ON exact constr. + pv: 26-Mar-2013: On Mac Pro 3.2 GHz Quad-Core Intel Xeon: 460 ms for 10000 coupons.
startTime = System.currentTimeMillis();
for (int looptest = 0; looptest < nbTest; looptest++) {
final CouponArithmeticAverageONDefinition ffDefinition = CouponArithmeticAverageONDefinition.from(FEDFUND, ScheduleCalculator.getAdjustedDate(REFERENCE_DATE, TENOR_1Y, USDLIBOR3M, NYC), TENOR_3M,
NOTIONAL, 0, USDLIBOR3M.getBusinessDayConvention(), true, NYC);
final CouponArithmeticAverageON ff = ffDefinition.toDerivative(REFERENCE_DATE);
pvAppro = METHOD_FF_APPRO.presentValue(ff, MULTICURVES);
// pvAppro = METHOD_FF_APPRO.presentValue(FEDFUND_CPN_3MFWD, MULTICURVES);
}
endTime = System.currentTimeMillis();
System.out.println("CouponArithmeticAverageONDiscountingMethod: " + nbTest + " pv Arithmetic Average ON - Approximation: " + (endTime - startTime) + " ms");