class CouponIborAverageDiscountingMethod {

  public MultipleCurrencyAmount presentValue(final CouponIborAverage coupon, final MulticurveProviderInterface multicurves) {
    ArgumentChecker.notNull(coupon, "Coupon");
    ArgumentChecker.notNull(multicurves, "Multi-curves provider");
    final double forward1 = multicurves.getSimplyCompoundForwardRate(coupon.getIndex1(), coupon.getFixingPeriodStartTime1(), coupon.getFixingPeriodEndTime1(), coupon.getFixingAccrualFactor1());
    final double forward2 = multicurves.getSimplyCompoundForwardRate(coupon.getIndex2(), coupon.getFixingPeriodStartTime2(), coupon.getFixingPeriodEndTime2(), coupon.getFixingAccrualFactor2());
    final double forward = coupon.getWeight1() * forward1 + coupon.getWeight2() * forward2;
    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  CouponIborAverageDiscountingMethod();

}