/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormalGARCH.java
logLikelihood += - Math.log( h) - 2 * Math.log( ( values[i+8]+displacement) /volScaling) - evalNext*evalNext / h;
logLikelihood += - Math.log ( h ) - 2 * Math.log ( ( values[i+1]+displacement ) /volScaling ) - evalNext*evalNext / h;
final double volScaling = (1+Math.abs(displacement)); double h = omega / (1.0 - alpha - beta); double eval = volScaling * (Math.log((values[windowIndexStart+1]+displacement)/(values[windowIndexStart+1-1]+displacement))); for (int i = windowIndexStart+1; i <= windowIndexEnd-1; i++) { h = (omega + alpha * eval * eval) + beta * h; final double evalNext = volScaling * (Math.log((values[i+1]+displacement)/(values[i]+displacement))); <extra_id_0> eval = evalNext; } logLikelihood += - Math.log(2 * Math.PI) * (windowIndexEnd-windowIndexStart); logLikelihood *= 0.5; return logLikelihood; }