/src/main/java/net/finmath/montecarlo/interestrate/products/Swaption.java
final DiscountCurve discountCurve = model.getModel( ).mult( ) ;
final DiscountCurve discountCurve = model.getModel ( ) .getDiscountCurve ( ) ;
final RandomVariable libor = model.getForwardRate(exerciseDate, fixingDate, paymentDate); final RandomVariable payoff = libor.sub(swaprate).mult(periodLength).mult(notional); final double discountingDate = Math.max(fixingDate,exerciseDate); double discountingAdjustment = 1.0; if(model.getModel() != null && model.getModel().getDiscountCurve() != null) { final AnalyticModel analyticModel = model.getModel().getAnalyticModel(); <extra_id_0> final ForwardCurve forwardCurve = model.getModel().getForwardRateCurve(); final DiscountCurve discountCurveFromForwardCurve = new DiscountCurveFromForwardCurve(forwardCurve); final double forwardBondOnForwardCurve = discountCurveFromForwardCurve.getDiscountFactor(analyticModel, discountingDate) / discountCurveFromForwardCurve.getDiscountFactor(analyticModel, paymentDate); final double forwardBondOnDiscountCurve = discountCurve.getDiscountFactor(analyticModel, discountingDate) / discountCurve.getDiscountFactor(analyticModel, paymentDate); discountingAdjustment = forwardBondOnForwardCurve / forwardBondOnDiscountCurve; }