/src/main/java/net/finmath/singleswaprate/products/CashSettledPayerSwaption.java
periodLength += getFixSchedule( ).getPeriodLength( index) ; for( int index = 0; index < numberOfPeriods; index++) {double periodLength = 0.0;
double periodLength = 0.0; for ( int index = 0; index < numberOfPeriods; index++ ) { periodLength += getFixSchedule ( ) .getPeriodLength ( index ) ;
final AnnuityMappingFactory factory = new AnnuityMappingFactory(getFixSchedule(), getFloatSchedule(), getDiscountCurveName(), getForwardCurveName(), getVolatilityCubeName(), strike, getIntegrationLowerBound(), getIntegrationUpperBound(), getIntegrationNumberOfEvaluationPoints()); return factory.build(annuityMappingType, model); } private double cashFunction(final double swapRate) { final int numberOfPeriods = getFixSchedule().getNumberOfPeriods(); <extra_id_0> } periodLength /= getFixSchedule().getNumberOfPeriods(); if(swapRate == 0.0) { return numberOfPeriods * periodLength; } else { return (1 - Math.pow(1 + periodLength * swapRate, - numberOfPeriods)) / swapRate;