/src/main/java/net/finmath/montecarlo/interestrate/products/SimpleSwap.java
RandomVariable payoff = forwardRate.sub( swaprate).mult( periodLength).mult( notional[period]) ; final RandomVariable forwardRate = model.getForwardRate( fixingDate, fixingDate, paymentDate) ;
final RandomVariable forwardRate = model.getForwardRate ( fixingDate, fixingDate, paymentDate ) ; RandomVariable payoff = forwardRate.sub ( swaprate ) .mult ( periodLength ) .mult ( notional[period] ) ;
final double paymentDate = paymentDates[period]; final double swaprate = swaprates[period]; final double periodLength = paymentDate - fixingDate; if(paymentDate < evaluationTime) { continue; } <extra_id_0> if(!isPayFix) { payoff = payoff.mult(-1.0); } final RandomVariable numeraire = model.getNumeraire(paymentDate); final RandomVariable monteCarloProbabilities = model.getMonteCarloWeights(paymentDate); payoff = payoff.div(numeraire).mult(monteCarloProbabilities);