/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionFromSwapSchedules.java
if( swaprate != 0) {
if ( fixRate != 0 ) {
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); discountedCashflowFloatingLeg = discountedCashflowFloatingLeg.add(periodCashFlow.mult(discountBond)); } <extra_id_0> final RandomVariable periodCashFlow = model.getRandomVariableForConstant(fixRate * periodLength * notional); discountedCashflowFloatingLeg = discountedCashflowFloatingLeg.add(periodCashFlow.mult(discountBond)); } } return discountedCashflowFloatingLeg; }