class IsdaCdsTradePricer {

  public PointSensitivities presentValueSensitivity(
      ResolvedCdsTrade trade,
      CreditRatesProvider ratesProvider,
      ReferenceData refData) {

    PointSensitivityBuilder pvSensiProduct = productPricer.presentValueSensitivity(
        trade.getProduct(), ratesProvider, ratesProvider.getValuationDate(), refData);
    if (!trade.getUpfrontFee().isPresent()) {
      return pvSensiProduct.build();
    }
    Payment upfront = trade.getUpfrontFee().get();
    PointSensitivityBuilder pvUpfront = upfrontPricer.presentValueSensitivity(
        upfront, ratesProvider.discountFactors(upfront.getCurrency()).toDiscountFactors());
    return pvSensiProduct.combinedWith(pvUpfront).build();
  }

  public  IsdaCdsTradePricer();
  public  IsdaCdsTradePricer(AccrualOnDefaultFormula formula);

}