Dear fellow users,
I am trying to write a script for MLE estimation of a CARR model, similar to GARCH. It is
a MEM model in daily ranges of some instrument, i,e,
Eq. 1: lRng = lambda * epsilon # epsilon is exponentially distributed here, giving the
shape of LL
Eq. 2: lambda = a + b*Rng(-1) + c*lambda(-1)
I tried the following code but the algorithm never converges. What should I improve?
Thanks in advance, Daniel
scalar a = 0.1
scalar b = 0.4
scalar c = 0.4
mle ll = -ln(lambda) + Rng/lambda
series lambda = mean(Rng)
series lambda = a + b*Rng(-1) + c*lambda(-1)
params a b c
end mle