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