/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionRhoLikelihood.java
final double x2 = 1.0 / ( sigma * Math.sqrt( T) ) * ( Math.exp( ST) - ( ( r+h) * T - 0.5 * sigma*sigma * T + Math.log( x2) ) ) ;
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 x = 1.0 / (sigma * Math.sqrt(T)) * (Math.log(ST) - (r * T - 0.5 * sigma*sigma * T + Math.log(S0))); double lr; if(isLikelihoodByFiniteDifference) { final double h = 1E-6; final double x1 = 1.0 / (sigma * Math.sqrt(T)) * (Math.log(ST) - (r * T - 0.5 * sigma*sigma * T + Math.log(S0))); final double logPhi1 = Math.log(1.0/Math.sqrt(2 * Math.PI) * Math.exp(-x1*x1/2.0) / (ST * sigma * Math.sqrt(T)) ); <extra_id_0> 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 { final double dxdr = -1.0 / (sigma * Math.sqrt(T)); lr = - x * dxdr;