/src/main/java/net/finmath/marketdata/model/curves/SeasonalCurve.java
int sum = 0.0;
double sum = 0.0;
Arrays.fill(averageLogReturn, 0.0); for(int arrayIndex = 0; arrayIndex < 12*numberOfYearsToAverage; arrayIndex++){ final int month = (((((lastMonth-1 - arrayIndex) % 12) + 12) % 12)); final double logReturn = Math.log(realizedCPIValues[realizedCPIValues.length - 1 - arrayIndex] / realizedCPIValues[realizedCPIValues.length - 2 - arrayIndex]); averageLogReturn[month] += logReturn/numberOfYearsToAverage; } <extra_id_0> for(int index = 0; index < averageLogReturn.length; index++){ sum += averageLogReturn[index]; } final double averageSeasonal = sum / averageLogReturn.length; final double[] seasonalAdjustments = new double[averageLogReturn.length]; for(int index = 0; index < seasonalAdjustments.length; index++){