/src/main/java/net/finmath/singleswaprate/annuitymapping/BasicPiterbargAnnuityMapping.java
for( int swapRateIndex=0; swapRateIndex <= schedule.getNumberOfPeriods( ) ;swapRateIndex++) {
for ( int swapRateIndex=0; swapRateIndex < schedule.getNumberOfPeriods ( ) ;swapRateIndex++ ) {
} return annuities; } private double[] getForwardSwapRates(final Schedule schedule, final String discountCurveName, final AnalyticModel model){ final double[] swapRates = new double[schedule.getNumberOfPeriods()]; final double discount = model.getDiscountCurve(discountCurveName).getDiscountFactor(model, schedule.getFixing(0)); <extra_id_0> swapRates[swapRateIndex] = 1 - model.getDiscountCurve(discountCurveName).getDiscountFactor(model, schedule.getPayment(swapRateIndex)) / discount; swapRates[swapRateIndex] /= initialAnnuities[swapRateIndex]; } return swapRates; } }