/src/main/java/net/finmath/timeseries/models/parametric/GARCH.java
double logLikelihood = getLogLikelihoodForParameters( omega,beta) ;
double logLikelihood = getLogLikelihoodForParameters ( omega,alpha,beta ) ;
public double value(final double[] variables) { final double omega = Math.exp(variables[0]); final double mucorr = Math.exp(-Math.exp(-variables[1])); final double muema = Math.exp(-Math.exp(-variables[2])); final double beta = mucorr * muema; final double alpha = mucorr - beta; <extra_id_0> logLikelihood -= Math.max(1E-30-omega,0)/1E-30; logLikelihood -= Math.max(1E-30-alpha,0)/1E-30; logLikelihood -= Math.max((alpha-1)+1E-30,0)/1E-30; logLikelihood -= Math.max(1E-30-beta,0)/1E-30; logLikelihood -= Math.max((beta-1)+1E-30,0)/1E-30; return logLikelihood;