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