/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/LocalRiskMinimizingHedgePortfolio.java
final double max = underlying.getMax( ) ;final double min = underlying.getMin( ) ;
final double min = underlying.getMin ( ) ;
final RandomVariable underlyingAtEvaluationTime = model.getAssetValue(evaluationTime,0); final RandomVariable numeraireAtEvaluationTime = model.getNumeraire(evaluationTime); final RandomVariable portfolioValue = amountOfNumeraireAsset.mult(numeraireAtEvaluationTime).add(amountOfUderlyingAsset.mult(underlyingAtEvaluationTime)); return portfolioValue; } private RandomVariable[] getBasisFunctions(final RandomVariable underlying) { <extra_id_0> final double max = underlying.getMax(); final ArrayList<RandomVariable> basisFunctionList = new ArrayList<>(); final double[] discretization = (new TimeDiscretizationFromArray(min, numberOfBins, (max-min)/numberOfBins)).getAsDoubleArray(); for(final double discretizationStep : discretization) { final RandomVariable indicator = underlying.sub(discretizationStep).choose(new RandomVariableFromDoubleArray(1.0), new RandomVariableFromDoubleArray(0.0)); basisFunctionList.add(indicator);