final double[] marketSpreads = new double[n];
for (int i = 0; i < n; i++) {
times[i] = IMMDateGenerator.getNextIMMDate(valuationTime, tenors[i]).withHour(0).withMinute(0).withSecond(0).withNano(0);
marketSpreads[i] = marketSpreadObjects[i] * 1e-4;
}
ISDACompliantCreditCurve hazardCurve = (ISDACompliantCreditCurve) inputs.getValue(ValueRequirementNames.HAZARD_RATE_CURVE);
final CDSAnalyticFactory analyticFactory = new CDSAnalyticFactory(0, definition.getCouponFrequency().getPeriod())
.with(definition.getBusinessDayAdjustmentConvention())
.with(definition.getCalendar()).with(definition.getStubType())
.withAccualDCC(definition.getDayCountFractionConvention());
final CDSAnalytic pricingCDS = analyticFactory.makeCDS(definition.getStartDate().toLocalDate(), definition.getEffectiveDate().toLocalDate(), definition.getMaturityDate().toLocalDate());