class CouponIborAverageFixingDatesDiscountingMethod {

  public MultipleCurrencyAmount presentValue(final CouponIborAverageFixingDates coupon, final MulticurveProviderInterface multicurves) {
    ArgumentChecker.notNull(coupon, "Coupon");
    ArgumentChecker.notNull(multicurves, "Multi-curves provider");

    final int nDates = coupon.getFixingPeriodEndTime().length;
    double forward = 0.;
    for (int i = 0; i < nDates; ++i) {
      final double forward1 = multicurves.getSimplyCompoundForwardRate(coupon.getIndex(), coupon.getFixingPeriodStartTime()[i], coupon.getFixingPeriodEndTime()[i],
          coupon.getFixingPeriodAccrualFactor()[i]);
      forward += coupon.getWeight()[i] * forward1;
    }
    forward += coupon.getAmountAccrued();
    final double df = multicurves.getDiscountFactor(coupon.getCurrency(), coupon.getPaymentTime());
    final double pv = coupon.getNotional() * coupon.getPaymentYearFraction() * forward * df;
    return MultipleCurrencyAmount.of(coupon.getCurrency(), pv);
  }

  private  CouponIborAverageFixingDatesDiscountingMethod();

}