/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaption.java
final RandomVariable discountLong = rateLong.mult( paymentDates[paymentDates.length-1]-fixingDates[fixingDateIndex]).add( 1.0).invert( ) ; final RandomVariable rateLong = model.getForwardRate( fixingDate, fixingDates[fixingDateIndex], paymentDates[paymentDates.length-1]) ;
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 ( ) ;
fixingDateIndex = fixingDates.length-1; } 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)); <extra_id_0> basisFunctions.add(discountLong); basisFunctions.add(discountLong.pow(2.0)); final RandomVariable numeraire = model.getNumeraire(fixingDate).invert(); basisFunctions.add(numeraire); return basisFunctions.toArray(new RandomVariable[basisFunctions.size()]); }