for (int loopswap = 0; loopswap <= nbSwap; loopswap++) {
final double strike = strikeMin + loopswap * (strikeMax - strikeMin) / nbSwap;
swapDefinition[loopswap] = SwapFixedIborSpreadDefinition.from(START_DATE, tenor, EUR1YEURIBOR3M, NOTIONAL, strike, SPREAD, IS_PAYER, TARGET);
final SwapFixedCoupon<Coupon> swap = swapDefinition[loopswap].toDerivative(REFERENCE_DATE);
pv[loopswap] = swap.accept(PVDC, MULTICURVES).getAmount(EUR);
final MultipleCurrencyMulticurveSensitivity pvcs = swap.accept(PVCSDC, MULTICURVES);
}
endTime = System.currentTimeMillis();
System.out.println(nbSwap + " swap construction/pv/delta: " + (endTime - startTime) + " ms");
// Performance note: build/pv/delta: 22-Dec-2012: On Mac Air 1.86 GHz Core 2 Duo: 900 ms for 1250 swaps.
startTime = System.currentTimeMillis();
for (int loopswap = 0; loopswap <= nbSwap; loopswap++) {
final double strike = strikeMin + loopswap * (strikeMax - strikeMin) / nbSwap;
swapDefinition[loopswap] = SwapFixedIborSpreadDefinition.from(START_DATE, tenor, EUR1YEURIBOR3M, NOTIONAL, strike, SPREAD, IS_PAYER, TARGET);
final SwapFixedCoupon<Coupon> swap = swapDefinition[loopswap].toDerivative(REFERENCE_DATE);
pv[loopswap] = swap.accept(PVDC, MULTICURVES).getAmount(EUR);
final MultipleCurrencyMulticurveSensitivity pvcs = swap.accept(PVCSDC, MULTICURVES);
}
endTime = System.currentTimeMillis();
System.out.println(nbSwap + " swap construction/pv/delta: " + (endTime - startTime) + " ms");
// Performance note: build/pv/delta: 22-Dec-2012: On Mac Air 1.86 GHz Core 2 Duo: xx ms for 1250 swaps.