/src/main/java/net/finmath/marketdata/products/SwapLeg.java
double forward = notionals[periodIndex];
double forward = spreads[periodIndex];
for(int periodIndex=0; periodIndex<legSchedule.getNumberOfPeriods(); periodIndex++) { final double fixingDate = productToModelTimeOffset + legSchedule.getFixing(periodIndex); final double periodStart = productToModelTimeOffset + legSchedule.getPeriodStart(periodIndex); final double periodEnd = productToModelTimeOffset + legSchedule.getPeriodEnd(periodIndex); final double paymentDate = productToModelTimeOffset + legSchedule.getPayment(periodIndex); final double periodLength = legSchedule.getPeriodLength(periodIndex); <extra_id_0> if(forwardCurve != null) { forward += forwardCurve.getForward(model, fixingDate, paymentDate-fixingDate); } double notional = notionals != null ? notionals[periodIndex] : 1.0; if(discountCurveForNotionalReset != null && discountCurveForNotionalReset != discountCurve) { notional *= discountCurveForNotionalReset.getDiscountFactor(model,periodStart) / discountCurve.getDiscountFactor(model,periodStart);