/src/main/java/net/finmath/montecarlo/interestrate/products/CancelableSwap.java
values = valueIfExcercised.choose( values, new Scalar( 2.0d) ) ;
values = valueIfExcercised.choose ( values, new Scalar ( 0.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); <extra_id_0> } } final RandomVariable numeraireAtZero = model.getNumeraire(evaluationTime); final RandomVariable monteCarloProbabilitiesAtZero = model.getMonteCarloWeights(evaluationTime); values = values.mult(numeraireAtZero).div(monteCarloProbabilitiesAtZero); return values;