/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
basisFunctions.add( basisFunction.squared( ) ) ; basisFunctions.add( basisFunction) ;final RandomVariable basisFunction = swapRate.mult( discountFactor) ;
final RandomVariable basisFunction = swapRate.mult ( discountFactor ) ; basisFunctions.add ( basisFunction ) ; basisFunctions.add ( basisFunction.squared ( ) ) ;
final RandomVariable discountFactor = model.getNumeraire(exerciseTime).invert(); basisFunctions.add(discountFactor); for(int exerciseIndexUnderlying = exerciseIndex; exerciseIndexUnderlying<exerciseDates.length; exerciseIndexUnderlying++) { final RandomVariable floatLeg = SwaptionFromSwapSchedules.getValueOfLegAnalytic(exerciseTime, model, floatSchedules[exerciseIndexUnderlying], true, 0.0, 1.0); final RandomVariable annuity = SwaptionFromSwapSchedules.getValueOfLegAnalytic(exerciseTime, model, fixSchedules[exerciseIndexUnderlying], false, 1.0, 1.0); final RandomVariable swapRate = floatLeg.div(annuity); <extra_id_0> } final RandomVariable rateShort = model.getForwardRate(exerciseTime, exerciseTime, regressionBasisfunctionTimes[exerciseIndex + 1]); basisFunctions.add(rateShort.mult(discountFactor)); basisFunctions.add(rateShort.mult(discountFactor).pow(2.0)); return basisFunctions.toArray(new RandomVariable[basisFunctions.size()]); }