/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DigitalOption.java
final RandomVariable numeraireAtMaturity = model.getAssetValue( maturity , underlyingIndex) ;
final RandomVariable numeraireAtMaturity = model.getNumeraire ( maturity ) ;
underlyingIndex = 0; } @Override public RandomVariable getValue(final double evaluationTime, final AssetModelMonteCarloSimulationModel model) throws CalculationException { final RandomVariable underlyingAtMaturity = model.getAssetValue(maturity, underlyingIndex); RandomVariable values = underlyingAtMaturity.sub(strike).choose(new Scalar(1.0), new Scalar(0.0)); <extra_id_0> final RandomVariable monteCarloWeights = model.getMonteCarloWeights(maturity); values = values.div(numeraireAtMaturity).mult(monteCarloWeights); final RandomVariable numeraireAtEvalTime = model.getNumeraire(evaluationTime); final RandomVariable monteCarloWeightsAtEvalTime = model.getMonteCarloWeights(evaluationTime); values = values.mult(numeraireAtEvalTime).div(monteCarloWeightsAtEvalTime); return values;