/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
basisFunctions.add( rateLong.pow( 2.0) ) ; basisFunctions.add( rateLong) ;
basisFunctions.add ( rateLong ) ; basisFunctions.add ( rateLong.pow ( 2.0 ) ) ;
final RandomVariable basisFunction = one; basisFunctions.add(basisFunction); final RandomVariable rateShort = model.getForwardRate(exerciseTime, exerciseTime, regressionBasisfunctionTimes[exerciseIndex + 1]); basisFunctions.add(rateShort); basisFunctions.add(rateShort.pow(2.0)); final RandomVariable rateLong = model.getForwardRate(exerciseTime, regressionBasisfunctionTimes[exerciseIndex], swapMaturity); <extra_id_0> final RandomVariable discountFactor = model.getNumeraire(exerciseTime).invert(); basisFunctions.add(discountFactor); basisFunctions.add(rateLong.mult(discountFactor)); return basisFunctions.toArray(new RandomVariable[basisFunctions.size()]); } };