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