final double presentValue = PV_CALCULATOR.calibrateAndGetPresentValue(valuationDate, cds, marketTenors, marketSpreads, yieldCurve, priceType);
// ----------------------------------------------------------------------------------------------------------------------------------------
// Loop through and bump each of the spreads at each tenor
ISDADateCurve bumpedYieldCurve;
double bumpedPresentValue;
for (int m = 0; m < nRates; m++) {
switch (interestRateBumpType) {
case ADDITIVE:
bumpedInterestRates[m] += bumpInBp;
try {
bumpedYieldCurve = new ISDADateCurve("Bumped", marketTenors, yieldCurve.getTimePoints(), bumpedInterestRates, yieldCurve.getOffset());
} catch (ArrayIndexOutOfBoundsException aioobe) {
s_logger.error("AIOOBE", aioobe);
throw aioobe;
}
bumpedPresentValue = PV_CALCULATOR.calibrateAndGetPresentValue(valuationDate, cds, marketTenors, marketSpreads, bumpedYieldCurve, priceType);
bucketedIR01[m] = (bumpedPresentValue - presentValue) / interestRateBump;
bumpedInterestRates[m] -= bumpInBp;
break;
case MULTIPLICATIVE:
bumpedInterestRates[m] *= 1 + bumpInBp;
bumpedYieldCurve = new ISDADateCurve("Bumped", marketTenors, yieldCurve.getTimePoints(), bumpedInterestRates, yieldCurve.getOffset());
bumpedPresentValue = PV_CALCULATOR.calibrateAndGetPresentValue(valuationDate, cds, marketTenors, marketSpreads, bumpedYieldCurve, priceType);
bucketedIR01[m] = (bumpedPresentValue - presentValue) / interestRateBump;
bumpedInterestRates[m] /= 1 + bumpInBp;
break;
default: