class IsdaCdsTradePricer {

  public CurrencyAmount presentValue(
      ResolvedCdsTrade trade,
      CreditRatesProvider ratesProvider,
      PriceType priceType,
      ReferenceData refData) {

    CurrencyAmount pvProduct = productPricer.presentValue(
        trade.getProduct(), ratesProvider, ratesProvider.getValuationDate(), priceType, refData);
    if (!trade.getUpfrontFee().isPresent()) {
      return pvProduct;
    }
    Payment upfront = trade.getUpfrontFee().get();
    CurrencyAmount pvUpfront =
        upfrontPricer.presentValue(upfront, ratesProvider.discountFactors(upfront.getCurrency()).toDiscountFactors());
    return pvProduct.plus(pvUpfront);
  }

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

}