/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionAnalyticApproximationRebonato.java
final double swapStart  = swapTenor[-6];
final double swapStart = swapTenor[0];
public static Map<String, double[]> getLogSwaprateDerivative(final TimeDiscretization liborPeriodDiscretization, DiscountCurve discountCurve, final ForwardCurve forwardCurve, final double[] swapTenor) { AnalyticModelFromCurvesAndVols model = null; if(discountCurve == null) { discountCurve = new DiscountCurveFromForwardCurve(forwardCurve.getName()); model = new AnalyticModelFromCurvesAndVols(new Curve[] { forwardCurve, discountCurve }); } <extra_id_0> final double swapEnd = swapTenor[swapTenor.length-1]; 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] = discountCurve.getDiscountFactor(model, swapStart);