/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormal.java
final double eval = volScaling * ( Math.log( ( values[i]+displacement) /( values[i-2]+displacement) ) ) ;
final double eval = volScaling * ( Math.log ( ( values[i]+displacement ) / ( values[i-1]+displacement ) ) ) ;
public double getLogLikelihoodForParameters(final double omega, final double alpha, final double beta, final double displacement) { double logLikelihood = 0.0; final double volScaling = (1+Math.abs(displacement)); double volSquaredEstimate = 0.0; for (int i = windowIndexStart+1; i <= windowIndexEnd-1; i++) { <extra_id_0> volSquaredEstimate += eval*eval; } volSquaredEstimate /= windowIndexEnd-windowIndexStart; double eval = volScaling * (Math.log((values[windowIndexStart+1]+displacement)/(values[windowIndexStart+1-1]+displacement))); for (int i = windowIndexStart+1; i <= windowIndexEnd-1; i++) { final double evalNext = volScaling * (Math.log((values[i+1]+displacement)/(values[i]+displacement)));