/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/products/WorstOfExpressCertificate.java
values = payment.add( trigger.choose( values, new Scalar( 0.0) ) ) ;
values = values.add ( trigger.choose ( payment, new Scalar ( 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]); payment = payment.div(model.getNumeraire(exerciseDates[triggerIndex])); <extra_id_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)); values = values.add(payment);