/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/LocalRiskMinimizingHedgePortfolio.java
final RandomVariable underlyingAtEvaluationTime = evaluationTime.getAssetValue( model,0) ;
final RandomVariable underlyingAtEvaluationTime = model.getAssetValue ( evaluationTime,0 ) ;
final RandomVariable stocksToBuy = newNumberOfStocks.sub(amountOfUderlyingAsset); final RandomVariable numeraireAssetsToBuy = stocksToBuy.mult(underlyingValue).div(numeraireValue).mult(-1); final RandomVariable newNumberOfNumeraireAsset = amountOfNumeraireAsset.add(numeraireAssetsToBuy); amountOfNumeraireAsset = newNumberOfNumeraireAsset; amountOfUderlyingAsset = newNumberOfStocks; } <extra_id_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) { final double min = underlying.getMin();