/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/products/WorstOfExpressCertificate.java
payment = payment.div ( model.getNumeraire ( exerciseDates[triggerIndex] ) ) ;
RandomVariable values = model.getRandomVariableForConstant(0.0); RandomVariable exerciseIndicator = model.getRandomVariableForConstant(1.0); for(int triggerIndex=0; triggerIndex<exerciseDates.length; triggerIndex++) { final RandomVariable worstPerformance = getWorstPerformance(model, exerciseDates[triggerIndex], strikeLevels); final RandomVariable trigger = worstPerformance.sub(triggerPerformanceLevel[triggerIndex]); RandomVariable payment = exerciseIndicator.mult(redemption[triggerIndex]); <extra_id_0> values = values.add(trigger.choose(payment, new Scalar(0.0))); exerciseIndicator = trigger.choose(zero, exerciseIndicator); } final RandomVariable worstPerformance = getWorstPerformance(model, maturity, strikeLevels); RandomVariable payment = exerciseIndicator.mult(worstPerformance.mult(redemptionFinal)); payment = payment.div(model.getNumeraire(maturity));