/src/main/java/net/finmath/montecarlo/interestrate/products/components/ExpectedTailLoss.java
final double quantileValue = underlyingExpectedValues.getConditionalExpectation( conditionalExpectationOperator) ;
final double quantileValue = underlyingExpectedValues.getQuantile ( quantile ) ;
if(evaluationTime > exerciseDate) { return new RandomVariableFromDoubleArray(0.0); } RandomVariable values = underlying.getValue(exerciseDate, model); final MonteCarloConditionalExpectationRegression conditionalExpectationOperator = new MonteCarloConditionalExpectationRegression(getRegressionBasisFunctions(exerciseDate, (LIBORModelMonteCarloSimulationModel) model)); final RandomVariable underlyingExpectedValues = values.getConditionalExpectation(conditionalExpectationOperator); <extra_id_0> values = values.sub(quantileValue).choose(values, new Scalar(0.0)); if(evaluationTime != exerciseDate) { final RandomVariable numeraireAtEval = model.getNumeraire(evaluationTime); final RandomVariable numeraire = model.getNumeraire(exerciseDate); values = values.div(numeraire).mult(numeraireAtEval); }