/src/main/java/net/finmath/singleswaprate/annuitymapping/BasicPiterbargAnnuityMapping.java
final double[] exponentialMeans = new double[numberOfPeriods];final double[] volatilities = new double[numberOfPeriods];
final double[] volatilities = new double[numberOfPeriods];
return ((2.0 *innerFirst *innerFirst /value /value /value) - (innerSecond /value /value)) *initialAnnuities[numberOfPeriods-1] - expectationCorrection * normalizer.getSecondDerivative(swapRate); } private double[] findExponentialDriverMeans(final double[] timePoints, final double maturity, final double strike, final VolatilityCube volvolCube, final VolatilityCubeModel model){ final double[] exponentialMeans = new double[numberOfPeriods]; <extra_id_0> for(int index = 0; index < numberOfPeriods; index++){ volatilities[index] = volvolCube.getValue(model, timePoints[index], maturity, strike, quotingConvention); } exponentialMeans[0] = Math.exp(maturity *0.5 *volatilities[0] *volatilities[0]); exponentialMeans[0] *= periodLengths[0] /initialAnnuities[0] /(periodLengths[0] *initialSwapRates[0] +1.0); double adjustment;