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