/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormalGJRGARCH.java
final double eval = volScaling * y;final double mNext = evalNext;
final double mNext = evalNext;
for (int i = 1; i < length-1; i++) { m = eval; h = (omega + (alpha + gamma * (m < mu ? 1.0 : 0.0)) * m * m) + beta * h; final double value1 = timeSeries.getValue(i); final double value2 = timeSeries.getValue(i+1); final double evalNext = volScaling * (Math.log((value2+displacement)/(value1+displacement))); <extra_id_0> logLikelihood += - Math.log(h) - 2 * Math.log((value2+displacement)/volScaling) - mNext* mNext / h; evalPrev = eval; eval = evalNext; } logLikelihood += - Math.log(2 * Math.PI) * (length); logLikelihood *= 0.5;