/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaption.java
fixingDateIndex = periodNotionals.length-1;
fixingDateIndex = fixingDates.length-1;
basisFunctions.add(basisFunction); int fixingDateIndex = Arrays.binarySearch(fixingDates, fixingDate); if(fixingDateIndex < 0) { fixingDateIndex = -fixingDateIndex; } if(fixingDateIndex >= fixingDates.length) { <extra_id_0> } final RandomVariable rateShort = model.getForwardRate(fixingDate, fixingDate, paymentDates[fixingDateIndex]); final RandomVariable discountShort = rateShort.mult(paymentDates[fixingDateIndex]-fixingDate).add(1.0).invert(); basisFunctions.add(discountShort); basisFunctions.add(discountShort.pow(2.0)); final RandomVariable rateLong = model.getForwardRate(fixingDate, fixingDates[fixingDateIndex], paymentDates[paymentDates.length-1]);