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