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