public static double parallelCS01(CreditDefaultSwapDefinition definition,
ISDACompliantYieldCurve yieldCurve,
ZonedDateTime[] times, double[] marketSpreads, CDSAnalytic analytic, double fracBump) {
double cs01;
if (definition instanceof StandardCreditDefaultSwapDefinition) {
StandardCreditDefaultSwapDefinition cds = (StandardCreditDefaultSwapDefinition) definition;
cs01 = CALCULATOR.parallelCS01(analytic, new QuotedSpread(cds.getQuotedSpread() * 1e-4, getCoupon(cds.getPremiumLegCoupon())), yieldCurve, fracBump);
} else if (definition instanceof LegacyCreditDefaultSwapDefinition) {
final CDSAnalyticFactory analyticFactory = new CDSAnalyticFactory(definition.getRecoveryRate(), definition.getCouponFrequency().getPeriod())
.with(definition.getBusinessDayAdjustmentConvention())
.with(definition.getCalendar()).with(definition.getStubType())
.withAccualDCC(definition.getDayCountFractionConvention());