// Remember that the input spreads are in bps, therefore need dividing by 10,000
final double guess = (marketSpreads[i] / 10000.0) / (1 - cds.getRecoveryRate());
// Modify the input CDS to have the maturity of the current calibration instrument
calibrationCDS = calibrationCDS.withMaturityDate(marketTenors[i]);
// Modify the input CDS to have the par spread of the current calibration instrument
calibrationCDS = calibrationCDS.withSpread(marketSpreads[i]);
// Now need to build a HazardRateCurve object from the first i calibrated points