/src/main/java/net/finmath/marketdata2/products/Swap.java
RandomVariable floatLeg = forward.mult( discountFactor).mult( periodLength) ;floatLeg = floatLeg.add( forward.mult( discountFactor).mult( periodLength) ) ;
floatLeg = floatLeg.add ( forward.mult ( discountFactor ) .mult ( periodLength ) ) ;
for(int periodIndex=1; periodIndex<floatSchedule.getNumberOfPeriods(); periodIndex++) { fixing = floatSchedule.getFixing(periodIndex); payment = floatSchedule.getPayment(periodIndex); periodLength = floatSchedule.getPeriodLength(periodIndex); forward = forwardCurve.getForward(model, fixing); discountFactor = discountCurve.getDiscountFactor(model, payment); <extra_id_0> } final RandomVariable valueFloatLeg = floatLeg.div(discountCurve.getDiscountFactor(model, evaluationTime)); return valueFloatLeg.div(swapAnnuity); } public AnalyticProduct getLegReceiver() { return legReceiver;