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