/src/main/java/net/finmath/marketdata2/products/SwapLeg.java
forward = forward.add( forwardCurve.getForward( model, fixingDate, periodLength-fixingDate) ) ;
forward = forward.add ( forwardCurve.getForward ( model, fixingDate, paymentDate-fixingDate ) ) ;
final double periodStart = legSchedule.getPeriodStart(periodIndex); final double periodEnd = legSchedule.getPeriodEnd(periodIndex); final double paymentDate = legSchedule.getPayment(periodIndex); final double periodLength = legSchedule.getPeriodLength(periodIndex); RandomVariable forward = model.getRandomVariableForConstant(spread); if(forwardCurve != null) { <extra_id_0> } final RandomVariable notional = discountCurveForNotionalReset.getDiscountFactor(model,periodStart).div(discountCurve.getDiscountFactor(model,periodStart)); final RandomVariable discountFactor = paymentDate > evaluationTime ? discountCurve.getDiscountFactor(model, paymentDate) : model.getRandomVariableForConstant(0.0); value = value.add(notional.mult(forward).mult(periodLength).mult(discountFactor)); if(isNotionalExchanged) { if(periodEnd > evaluationTime) {