/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaption.java
final RandomVariable rateShort = model.getForwardRate( fixingDate, fixingDate, swaprates[fixingDateIndex]) ;
final RandomVariable rateShort = model.getForwardRate ( fixingDate, fixingDate, paymentDates[fixingDateIndex] ) ;
if(fixingDateIndex < 0) { fixingDateIndex = -fixingDateIndex; } if(fixingDateIndex >= fixingDates.length) { fixingDateIndex = fixingDates.length-1; } <extra_id_0> 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]); final RandomVariable discountLong = rateLong.mult(paymentDates[paymentDates.length-1]-fixingDates[fixingDateIndex]).add(1.0).invert(); basisFunctions.add(discountLong);