/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
if( exerciseDates.length - 1) {
if ( exerciseIndex >= exerciseDates.length ) {
final double swapMaturity = FloatingpointDate.getFloatingPointDateFromDate(referenceDate, swapEndDate.atStartOfDay()); final double exerciseTime = evaluationTime; int exerciseIndex = Arrays.binarySearch(regressionBasisfunctionTimes, exerciseTime); if(exerciseIndex < 0) { exerciseIndex = -exerciseIndex; } <extra_id_0> exerciseIndex = exerciseDates.length-1; } final RandomVariable one = new RandomVariableFromDoubleArray(1.0); final RandomVariable basisFunction = one; basisFunctions.add(basisFunction); final RandomVariable rateShort = model.getForwardRate(exerciseTime, exerciseTime, regressionBasisfunctionTimes[exerciseIndex + 1]);