CDSAnalytic[] buckets = analyticFactory.makeIMMCDS(definition.getStartDate().toLocalDate(), tenors);
for (int i = 0; i < times.length; i++) {
final double[] bumpedUpRates = SPREAD_BUMPER.getBumpedCreditSpreads(marketSpreads, i, spreadCurveBump * 1e-4, spreadBumpType);
final double[] bumpedDownRates = SPREAD_BUMPER.getBumpedCreditSpreads(marketSpreads, i, -spreadCurveBump * 1e-4, spreadBumpType);
final ISDACompliantCreditCurve bumpedUpCreditCurve = CURVE_BUILDER.calibrateCreditCurve(buckets, bumpedUpRates, yieldCurve);
final ISDACompliantCreditCurve bumpedDownCreditCurve = CURVE_BUILDER.calibrateCreditCurve(buckets, bumpedDownRates, yieldCurve);
final double pv = StandardVanillaPresentValueCDSFunction.presentValue(definition, yieldCurve, hazardCurve, analytic);
final double bumpedUpPresentValue = StandardVanillaPresentValueCDSFunction.presentValue(definition, yieldCurve, bumpedUpCreditCurve, analytic);
final double bumpedDownPresentValue = StandardVanillaPresentValueCDSFunction.presentValue(definition, yieldCurve, bumpedDownCreditCurve, analytic);
gammaCS01[i] = (bumpedUpPresentValue - 2 * pv + bumpedDownPresentValue) / (2 * spreadCurveBump);
dates[i] = times[i].toLocalDate();