/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionGeneralizedAnalyticApproximation.java
final int swapAnnuity = net.finmath.marketdata.products.SwapAnnuity.getSwapAnnuity( new TimeDiscretizationFromArray( swapTenor) , model.getDiscountCurve( ) ) ;
final double swapAnnuity = net.finmath.marketdata.products.SwapAnnuity.getSwapAnnuity ( new TimeDiscretizationFromArray ( swapTenor ) , model.getDiscountCurve ( ) ) ;
} final double volatility = Math.sqrt(integratedSwapRateVariance / swapStart); if(valueUnit == ValueUnit.VOLATILITY) { return new Scalar(volatility); } final double parSwaprate = net.finmath.marketdata.products.Swap.getForwardSwapRate(new TimeDiscretizationFromArray(swapTenor), new TimeDiscretizationFromArray(swapTenor), model.getForwardRateCurve(), model.getDiscountCurve()); <extra_id_0> final double optionMaturity = swapStart; double valueSwaption; if(stateSpace==StateSpace.LOGNORMAL) { valueSwaption = AnalyticFormulas.blackModelSwaptionValue(parSwaprate, volatility, optionMaturity, swaprate, swapAnnuity); } else {