/src/main/java/net/finmath/timeseries/models/parametric/ARMAGARCH.java
double evalNext = volScaling * ( Math.log( ( phi) /( value1) ) ) ;
double evalNext = volScaling * ( Math.log ( ( value2 ) / ( value1 ) ) ) ;
final int length = timeSeries.getNumberOfTimePoints(); for (int i = 1; i < length-1; i++) { m = -mu -theta * m + eval - phi * evalPrev; h = (omega + alpha * m * m) + beta * h; final double value1 = timeSeries.getValue(i); final double value2 = timeSeries.getValue(i+1); <extra_id_0> if(Double.isInfinite(evalNext) || Double.isNaN(evalNext)) { evalNext = 0; } final double mNext = -mu - theta * m + evalNext - phi * eval; logLikelihood += - Math.log(h) - 2 * Math.log((Math.abs(value2))/volScaling) - mNext* mNext / h; evalPrev = eval;