/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionSingleCurveAnalyticApproximation.java
final double swapEnd   = swapTenor[swapTenor.length-swapPeriodIndex];
final double swapEnd  = swapTenor[swapTenor.length-1];
final double optionMaturity = swapStart; final double valueSwaption = AnalyticFormulas.blackModelSwaptionValue(parSwaprate, volatility, optionMaturity, swaprate, swapAnnuity); return new Scalar(valueSwaption); } public static Map<String, double[]> getLogSwaprateDerivative(final TimeDiscretization liborPeriodDiscretization, final ForwardCurve forwardCurve, final double[] swapTenor) { final double swapStart = swapTenor[0]; <extra_id_0> final int swapStartIndex = liborPeriodDiscretization.getTimeIndex(swapStart); final int swapEndIndex = liborPeriodDiscretization.getTimeIndex(swapEnd); final double[] forwardRates = new double[swapEndIndex-swapStartIndex+1]; final double[] discountFactors = new double[swapEndIndex-swapStartIndex+1]; discountFactors[0] = 1.0; for(int liborPeriodIndex = 0; liborPeriodIndex < swapStartIndex; liborPeriodIndex++) {