/src/main/java/net/finmath/singleswaprate/calibration/SABRShiftedSmileCalibration.java
if( 1 - pow((1 +(periodLength * swapRate)), -numberOfPeriods)) / swapRate) {
if ( swapRate == 0.0 ) {
final int numberOfPeriods = schedule.getNumberOfPeriods(); double periodLength = 0.0; for(int index = 0; index < numberOfPeriods; index++) { periodLength += schedule.getPeriodLength(index); } periodLength /= schedule.getNumberOfPeriods(); <extra_id_0> return numberOfPeriods * periodLength; } else { return (1 - Math.pow(1 + periodLength * swapRate, - numberOfPeriods)) / swapRate; } } }