class NormalSwaptionPhysicalProductPricer extends VolatilitySwaptionPhysicalProductPricer {

  public double impliedVolatilityFromPresentValue(
      ResolvedSwaption swaption,
      RatesProvider ratesProvider,
      DayCount dayCount,
      double presentValue) {

    double sign = swaption.getLongShort().sign();
    ArgChecker.isTrue(presentValue * sign > 0, "Present value sign must be in line with the option Long/Short flag ");
    validateSwaption(swaption);
    LocalDate valuationDate = ratesProvider.getValuationDate();
    LocalDate expiryDate = swaption.getExpiryDate();
    ArgChecker.isTrue(expiryDate.isAfter(valuationDate),
        "Expiry must be after valuation date to compute an implied volatility");
    double expiry = dayCount.yearFraction(valuationDate, expiryDate);
    ResolvedSwap underlying = swaption.getUnderlying();
    ResolvedSwapLeg fixedLeg = fixedLeg(underlying);
    double forward = getSwapPricer().parRate(underlying, ratesProvider);
    double pvbp = getSwapPricer().getLegPricer().pvbp(fixedLeg, ratesProvider);
    double numeraire = Math.abs(pvbp);
    double strike = getSwapPricer().getLegPricer().couponEquivalent(fixedLeg, ratesProvider, pvbp);
    PutCall putCall = PutCall.ofPut(fixedLeg.getPayReceive().isReceive());
    return NormalFormulaRepository.impliedVolatility(
        Math.abs(presentValue), forward, strike, expiry, 0.01, numeraire, putCall);
  }

  public  NormalSwaptionPhysicalProductPricer(DiscountingSwapProductPricer swapPricer);

}