class IsdaHomogenousCdsIndexProductPricer {

  public PointSensitivityBuilder riskyAnnuitySensitivity(
      ResolvedCdsIndex cdsIndex,
      CreditRatesProvider ratesProvider,
      LocalDate referenceDate,
      ReferenceData refData) {

    if (isExpired(cdsIndex, ratesProvider)) {
      return PointSensitivityBuilder.none();
    }
    LocalDate stepinDate = cdsIndex.getStepinDateOffset().adjust(ratesProvider.getValuationDate(), refData);
    LocalDate effectiveStartDate = cdsIndex.calculateEffectiveStartDate(stepinDate);
    ResolvedCds cds = cdsIndex.toSingleNameCds();
    Triple<CreditDiscountFactors, LegalEntitySurvivalProbabilities, Double> rates = reduceDiscountFactors(cds, ratesProvider);
    return underlyingPricer.riskyAnnuitySensitivity(
        cds, rates.getFirst(), rates.getSecond(), referenceDate, stepinDate, effectiveStartDate);
  }

  public  IsdaHomogenousCdsIndexProductPricer(AccrualOnDefaultFormula formula);

}