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