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