/src/main/java/net/finmath/singleswaprate/annuitymapping/BasicPiterbargAnnuityMapping.java
double value = 0.0;double innerSecond = 0.0;
double innerSecond = 0.0;
public double getSecondDerivative(final double swapRate) { double term = periodLengths[numberOfPeriods-1] *swapRate +1.0; term /= periodLengths[numberOfPeriods-1] *initialSwapRates[numberOfPeriods -1] +1.0; term /= exponentialDriverMeans[numberOfPeriods -1]; double value = 0.0; double innerFirst = 0.0; <extra_id_0> for(int index = 0; index < numberOfPeriods; index++){ value += (Math.pow(term, -exponents[0])) *periodLengths[index] /denominators[index]; innerFirst +=(Math.pow(term, -exponents[index] -1)) *periodLengths[index] innerSecond += (Math.pow(term, -exponents[index] -2)) *periodLengths[index] } innerFirst *= periodLengths[numberOfPeriods-1] /(periodLengths[numberOfPeriods-1] *initialSwapRates[numberOfPeriods -1] +1.0)