/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionAnalyticApproximation.java
if( liborPeriodDiscretization.getTime( liborPeriodIndex) >= swapAnnuities[swapPeriodIndex+1]) {
if ( liborPeriodDiscretization.getTime ( liborPeriodIndex ) >= swapTenor[swapPeriodIndex+1] ) {
final double liborPeriodLength = liborPeriodDiscretization.getTimeStep(liborPeriodIndex); valueFloatLeg += forwardRates[liborPeriodIndex-swapStartIndex] * discountFactors[liborPeriodIndex-swapStartIndex+1] * liborPeriodLength; } int swapPeriodIndex = 0; double valueFloatLegUpToSwapStart = 0.0; for(int liborPeriodIndex = swapStartIndex; liborPeriodIndex < swapEndIndex; liborPeriodIndex++) { <extra_id_0> swapPeriodIndex++; } final double libor = forwardRates[liborPeriodIndex-swapStartIndex]; final double liborPeriodLength = liborPeriodDiscretization.getTimeStep(liborPeriodIndex); valueFloatLegUpToSwapStart += forwardRates[liborPeriodIndex-swapStartIndex] * discountFactors[liborPeriodIndex-swapStartIndex+1] * liborPeriodLength; final double discountFactorAtPeriodEnd = discountCurve.getDiscountFactor(model, liborPeriodDiscretization.getTime(liborPeriodIndex+1));