class DiscountingTermDepositTradePricer {

  public CurrencyAmount currentCash(ResolvedTermDepositTrade trade, RatesProvider provider) {
    ResolvedTermDeposit product = trade.getProduct();
    if (product.getStartDate().isEqual(provider.getValuationDate())) {
      return CurrencyAmount.of(product.getCurrency(), -product.getNotional());
    }
    if (product.getEndDate().isEqual(provider.getValuationDate())) {
      return CurrencyAmount.of(product.getCurrency(), product.getNotional() + product.getInterest());
    }
    return CurrencyAmount.zero(product.getCurrency());
  }

  public  DiscountingTermDepositTradePricer(DiscountingTermDepositProductPricer productPricer);

}