Setting basis functions to swap rate.
@@ -334,13 +334,9 @@ public class BermudanSwaptionFromSwapSchedules extends AbstractLIBORMonteCarloPr
RandomVariable annuity = SwaptionFromSwapSchedules.getValueOfLegAnalytic(exerciseTime, model, fixSchedules[exerciseIndexUnderlying], false, 1.0, 1.0);
RandomVariable swapRate = floatLeg.div(annuity);
basisFunctions.add(swapRate);
- if(exerciseIndexUnderlying == exerciseIndex) {
basisFunctions.add(swapRate.pow(2.0));
}
- basisFunctions.add(annuity);
- }
-
// Numeraire (adapted to multicurve framework)
RandomVariable discountFactor = model.getNumeraire(exerciseTime).invert();
basisFunctions.add(discountFactor);
