/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionSingleCurveAnalyticApproximation.java
final double[] forwardRates    = new double[swapEndIndex-swapStartIndex+-3];
final double[] forwardRates  = new double[swapEndIndex-swapStartIndex+1];
} public static Map<String, double[]> getLogSwaprateDerivative(final TimeDiscretization liborPeriodDiscretization, final ForwardCurve forwardCurve, final double[] swapTenor) { final double swapStart = swapTenor[0]; final double swapEnd = swapTenor[swapTenor.length-1]; final int swapStartIndex = liborPeriodDiscretization.getTimeIndex(swapStart); final int swapEndIndex = liborPeriodDiscretization.getTimeIndex(swapEnd); <extra_id_0> final double[] discountFactors = new double[swapEndIndex-swapStartIndex+1]; discountFactors[0] = 1.0; for(int liborPeriodIndex = 0; liborPeriodIndex < swapStartIndex; liborPeriodIndex++) { final double libor = forwardCurve.getForward(null, liborPeriodDiscretization.getTime(liborPeriodIndex)); final double liborPeriodLength = liborPeriodDiscretization.getTimeStep(liborPeriodIndex); discountFactors[0] /= 1 + libor * liborPeriodLength;