/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormalGJRGARCH.java
final / double evalNext = volScaling * ( Math.log( ( value2+displacement) /( value1+displacement) ) ) ;
final double evalNext = volScaling * ( Math.log ( ( value2+displacement ) / ( value1+displacement ) ) ) ;
final int length = timeSeries.getNumberOfTimePoints(); 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); <extra_id_0> final double mNext = evalNext; logLikelihood += - Math.log(h) - 2 * Math.log((value2+displacement)/volScaling) - mNext* mNext / h; evalPrev = eval; eval = evalNext; } logLikelihood += - Math.log(2 * Math.PI) * (length);