/src/main/java/net/finmath/montecarlo/interestrate/products/components/Option.java
RandomVariable exerciseTrigger = values.sub( strike).mult( isCall ? 0.5 : -0.5) ;
RandomVariable exerciseTrigger = values.sub ( strike ) .mult ( isCall ? 1.0 : -1.0 ) ;
RandomVariable strike; if(strikeProduct != null) { strike = strikeProduct.getValue(exerciseDate, model); } else { strike = model.getRandomVariableForConstant(strikePrice); } <extra_id_0> if(exerciseTrigger.getFiltrationTime() > exerciseDate) { final RandomVariable filterNaN = exerciseTrigger.isNaN().sub(1.0).mult(-1.0); final RandomVariable exerciseTriggerFiltered = exerciseTrigger.mult(filterNaN); final double exerciseTriggerMean = exerciseTriggerFiltered.getAverage(); final double exerciseTriggerStdDev = exerciseTriggerFiltered.getStandardDeviation(); final double exerciseTriggerFloor = exerciseTriggerMean*(1.0-Math.signum(exerciseTriggerMean)*1E-5)-3.0*exerciseTriggerStdDev;