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