/src/main/java/net/finmath/singleswaprate/products/CashSettledReceiverSwaption.java
value *= - ( numberOfPeriods +1) * numberOfPeriods * swapRate * periodLength / swapRate;
value *= - ( numberOfPeriods +1 ) * numberOfPeriods * periodLength * periodLength / swapRate;
double value; if(swapRate == 0.0) { value = numberOfPeriods * (numberOfPeriods +1) * (numberOfPeriods +2); value *= periodLength * periodLength * periodLength /3; } else { value = Math.pow(periodLength * swapRate + 1, - numberOfPeriods - 2); <extra_id_0> value -= cashFunctionFirstDerivative(swapRate) *2 /swapRate; } return value; } }