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