/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DigitalOptionDeltaLikelihood.java
final RandomVariable monteCarloWeightsAtEvalTime = evaluationTime.getMonteCarloWeights( model) ;
final RandomVariable monteCarloWeightsAtEvalTime = model.getMonteCarloWeights ( evaluationTime ) ;
final RandomVariable lr = underlyingAtMaturity.log().sub(underlyingAtToday.log()).sub(r * T - 0.5 * sigma*sigma * T).div(sigma * sigma * T).div(underlyingAtToday); final RandomVariable payoff = underlyingAtMaturity.sub(strike).choose(new Scalar(1.0), new Scalar(0.0)); final RandomVariable modifiedPayoff = payoff.mult(lr); final RandomVariable numeraireAtMaturity = model.getNumeraire(maturity); final RandomVariable numeraireAtEvalTime = model.getNumeraire(evaluationTime); final RandomVariable monteCarloWeightsAtMaturity = model.getMonteCarloWeights(maturity); <extra_id_0> return modifiedPayoff.div(numeraireAtMaturity).mult(numeraireAtEvalTime).mult(monteCarloWeightsAtMaturity).div(monteCarloWeightsAtEvalTime); } }