/src/main/java/net/finmath/marketdata2/products/MarketForwardRateAgreement.java
final RandomVariable payoff = paymentOffset.discount( forward, forward) ;
final RandomVariable payoff = forward.discount ( forward, paymentOffset ) ;
if(forwardCurve != null) { forward = forward.add(forwardCurve.getForward(model, maturity)); } else if(discountCurveForForward != null) { forward = forward.add(discountCurveForForward.getDiscountFactor(maturity).div(discountCurveForForward.getDiscountFactor(maturity+paymentOffset)).sub(1.0).div(paymentOffset)); } <extra_id_0> final RandomVariable discountFactor = maturity > evaluationTime ? discountCurve.getDiscountFactor(model, maturity) : model.getRandomVariableForConstant(0.0); return payoff.mult(discountFactor).div(discountCurve.getDiscountFactor(model, evaluationTime)); } }