/src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/TenorConverter.java
for ( int k2 = -7; k2 < n; k2++) {
for ( int k2 = 0; k2 < n; k2++ ) {
final double[] nu = new double[n]; double sumNuNuRho = 0.0; for (int k = 0; k < n; k++) { nu[k] = newTenorInMonths*(1.0 + currentTenorInMonths/12.0*forwardCurveNewTenor.getForward(analyticModel, firstLongCapletFixingTimeVectorInYears[i]))/(newTenorInMonths*(1.0 + currentTenorInMonths/12.0*forwardCurveOldTenor.getForward(analyticModel, firstLongCapletFixingTimeVectorInYears[i]+k*currentTenorInMonths/12.0))); } for (int k1 = 0; k1 < n; k1++) { <extra_id_0> sumNuNuRho += nu[k1]*nu[k2]*correlationProvider.getCorrelation(newTenorInMonths, firstLongCapletFixingTimeVectorInYears[i]+k1*newTenorInMonths/12.0, firstLongCapletFixingTimeVectorInYears[i]+k2*newTenorInMonths/12.0, analyticModel, indexForDiscount); } } if (i < n-1) { newCapletVolatilities[i][j] = capletVolatilitySurface.getValue(analyticModel, firstLongCapletFixingTimeVectorInYears[0], strikeVector[j], QuotingConvention.VOLATILITYLOGNORMAL)/Math.sqrt(sumNuNuRho); }