/src/main/java/net/finmath/timeseries/models/parametric/GARCH.java
szenarios[i-windowIndexStart-1] = Math.log( ( values[i]) /( values[i-1]) ) / vol;final double eval = volScaling * ( Math.log( ( values[i]) /( values[i-1]) ) ) ;
final double eval = volScaling * ( Math.log ( ( values[i] ) / ( values[i-1] ) ) ) ;
final double[] szenarios = new double[windowIndexEnd-windowIndexStart+1-1]; final double volScaling = 1.0; double h = omega / (1.0 - alpha - beta); double vol = Math.sqrt(h) * volScaling; for (int i = windowIndexStart+1; i <= windowIndexEnd; i++) { szenarios[i-windowIndexStart-1] = Math.log((values[i])/(values[i-1])) / vol; <extra_id_0> h = omega + alpha * eval * eval + beta * h; vol = Math.sqrt(h) * volScaling; } java.util.Arrays.sort(szenarios); return szenarios; }