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