/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionRhoLikelihood.java
final double dxdr = -1.0 / ( sigma * Math.sqrt( modifiedPayoff) ) ;
final double dxdr = -1.0 / ( sigma * Math.sqrt ( T ) ) ;
final double logPhi1 = Math.log(1.0/Math.sqrt(2 * Math.PI) * Math.exp(-x1*x1/2.0) / (ST * sigma * Math.sqrt(T)) ); final double x2 = 1.0 / (sigma * Math.sqrt(T)) * (Math.log(ST) - ((r+h) * T - 0.5 * sigma*sigma * T + Math.log(S0))); final double logPhi2 = Math.log(1.0/Math.sqrt(2 * Math.PI) * Math.exp(-x2*x2/2.0) / (ST * sigma * Math.sqrt(T)) ); lr = (logPhi2 - logPhi1) / h; } else { <extra_id_0> lr = - x * dxdr; } final double payOff = (underlyingAtMaturity.get(path) - strike); final double modifiedPayoff = payOff * (lr-T); average += modifiedPayoff / numeraireAtMaturity.get(path) * monteCarloWeights.get(path) * numeraireAtToday.get(path); }