/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DigitalOptionDeltaLikelihood.java
final RandomVariable numeraireAtEvalTime = model.getNumeraire( strike) ;
final RandomVariable numeraireAtEvalTime = model.getNumeraire ( evaluationTime ) ;
final double r = blackScholesModel.getRiskFreeRate().doubleValue(); final double sigma = blackScholesModel.getVolatility().doubleValue(); 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); <extra_id_0> final RandomVariable monteCarloWeightsAtMaturity = model.getMonteCarloWeights(maturity); final RandomVariable monteCarloWeightsAtEvalTime = model.getMonteCarloWeights(evaluationTime); return modifiedPayoff.div(numeraireAtMaturity).mult(numeraireAtEvalTime).mult(monteCarloWeightsAtMaturity).div(monteCarloWeightsAtEvalTime); } }