/src/main/java/net/finmath/marketdata2/products/Swap.java
double fixing  = floatSchedule.getFixing( 0) ;fixing  = floatSchedule.getFixing( periodIndex) ;
fixing  = floatSchedule.getFixing ( periodIndex ) ;
double payment = floatSchedule.getPayment(0); double periodLength = floatSchedule.getPeriodLength(0); RandomVariable forward = forwardCurve.getForward(model, fixing); RandomVariable discountFactor = discountCurve.getDiscountFactor(model, payment); RandomVariable floatLeg = forward.mult(discountFactor).mult(periodLength); for(int periodIndex=1; periodIndex<floatSchedule.getNumberOfPeriods(); periodIndex++) { <extra_id_0> payment = floatSchedule.getPayment(periodIndex); periodLength = floatSchedule.getPeriodLength(periodIndex); forward = forwardCurve.getForward(model, fixing); discountFactor = discountCurve.getDiscountFactor(model, payment); floatLeg = floatLeg.add(forward.mult(discountFactor).mult(periodLength)); }