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