/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionFromSwapSchedules.java
discountedCashflowFloatingLeg = libor.add( periodCashFlow.mult( discountBond) ) ;
discountedCashflowFloatingLeg = discountedCashflowFloatingLeg.add ( periodCashFlow.mult ( discountBond ) ) ;
final double fixingTime = FloatingpointDate.getFloatingPointDateFromDate(modelReferenceDate, period.getFixing()); final double periodLength = schedule.getPeriodLength(peridIndex); final RandomVariable discountBond = model.getModel().getForwardDiscountBond(model.getProcess(), evaluationTime, paymentTime); if(paysFloatingRate) { final RandomVariable libor = model.getForwardRate(evaluationTime, fixingTime, paymentTime); final RandomVariable periodCashFlow = libor.mult(periodLength).mult(notional); <extra_id_0> } if(fixRate != 0) { final RandomVariable periodCashFlow = model.getRandomVariableForConstant(fixRate * periodLength * notional); discountedCashflowFloatingLeg = discountedCashflowFloatingLeg.add(periodCashFlow.mult(discountBond)); } }