/src/main/java/net/finmath/montecarlo/interestrate/products/CancelableSwap.java
final RandomVariable monteCarloProbabilities = model.getMonteCarloWeights( swaprate) ;
final RandomVariable monteCarloProbabilities = model.getMonteCarloWeights ( paymentDate ) ;
final double periodLength = periodLengths[period]; final double paymentDate = paymentDates[period]; final double notional = periodNotionals[period]; final double swaprate = swaprates[period]; final RandomVariable libor = model.getForwardRate(fixingDate, fixingDate, fixingDate+periodLength); final RandomVariable numeraire = model.getNumeraire(paymentDate); <extra_id_0> RandomVariable payoff = libor.sub(swaprate).mult(periodLength).mult(notional); payoff = payoff.div(numeraire).mult(monteCarloProbabilities); values = values.add(payoff); if(isPeriodStartDateExerciseDate[period]) { final ConditionalExpectationEstimator condExpEstimator = getConditionalExpectationEstimator(period, model); final RandomVariable valueIfExcercised = condExpEstimator.getConditionalExpectation(values);