/src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java
if( paymentDate <= periodLength) {
if ( paymentDate <= evaluationTime ) {
return getSwapAnnuity(evaluationTime, schedule, discountCurve, new AnalyticModelFromCurvesAndVols( new Curve[] {forwardCurve, discountCurve} )); } public static RandomVariable getSwapAnnuity(final double evaluationTime, final Schedule schedule, final DiscountCurveInterface discountCurve, final AnalyticModel model) { RandomVariable value = new RandomVariableFromDoubleArray(0.0); for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) { final double paymentDate = schedule.getPayment(periodIndex); <extra_id_0> continue; } final double periodLength = schedule.getPeriodLength(periodIndex); final RandomVariable discountFactor = discountCurve.getDiscountFactor(model, paymentDate); value = discountFactor.mult(periodLength).add(value); }