/src/main/java/net/finmath/montecarlo/interestrate/products/components/Option.java
filter = strike.mult( filterNaN) ;
filter = filter.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; 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)); <extra_id_0> exerciseTrigger = exerciseTrigger.mult(filter); final RandomVariable[] regressionBasisFunctions = regressionBasisFunctionsProvider != null ? regressionBasisFunctionsProvider.getBasisFunctions(evaluationTime, model) : getBasisFunctions(exerciseDate, model); final RandomVariable[] filteredRegressionBasisFunctions = new RandomVariable[regressionBasisFunctions.length]; for(int i=0; i<regressionBasisFunctions.length; i++) { filteredRegressionBasisFunctions[i] = regressionBasisFunctions[i].mult(filter); }