[R-SIG-Finance] rugarch package vs Eviews cannot get similar results from a model with GARCH errors.
alexios galanos
@|ex|o@ @end|ng |rom 4d@c@pe@com
Fri Jan 24 19:41:00 CET 2025
Among other things, Eviews uses backcasting with decay parameter 0.7 for the variance initialization as default (if I remember correctly), whereas
rugarch uses the unconditional variance (i.e. no exponential decay, but there is an option to do so). Then there are differences in the optimizer, bounds etc, which will be likely magnified the smaller your dataset is.
I also suggest you switch to tsgarch instead. Though it does not have a joint ARMA module included (you just pass the residuals from the ARMA module), it has higher accuracy (see the official benchmark https://cran.r-project.org/web/packages/tsgarch/vignettes/benchmark.html), and is in active enhancement/maintenance mode.
Alexios
> On Jan 24, 2025, at 9:30 AM, matheus barroso <matheus_vb using hotmail.com> wrote:
>
> Different random seeds / generators
> Sent from my iPhone
>
>> On 24 Jan 2025, at 14:10, Manfred Alonso Esquivel Monge via R-SIG-Finance <r-sig-finance using r-project.org> wrote:
>>
>> I'm trying to replicate in R some results that I get from an Eviews estimation of a model with GARCH errors. For this, I'm using the "rugarch" package. The problem is that estimated parameters differ by a lot. This is the set up I'm using in R (the data are in an xts object names "datos"):
>>
>> spec <- ugarchspec(
>> variance.model = list(model = "sGARCH", garchOrder = c(2, 1)),
>> mean.model = list(armaOrder = c(2, 0), include.mean = TRUE, external.regressors = as.matrix(datos[, c("jueves", "viernes", "sem2", "sem2_ene", "sem3_nov", "sem4_nov")]))
>> )
>> fit_garch <- ugarchfit(spec = spec, data = datos$d_TC, solver = "gosolnp")
>>
>>
>>
>> This es the set up I'm using in Eviews:
>>
>> equation fit_garch.arch(2,1) d_TC c ar(1) ar(2) jueves viernes sem2 sem2_ene sem3_nov sem4_nov
>>
>>
>> As you can see, they are supposed to be the same model, an ARMA(2,0) with constant term plus some "external regressors" in the mean equation, and a GARCH(2,1) models for the variance. But coefficient estimates differ by no small amount.
>> I verified that data are the same (run OLS and got identical results between the softwares). As a side note, R results does not converge easily, I tried some of the solvers and only "gosolnp" and "hybrid" converge.
>> This is my first time using "rugarch", so chances are big that there is something wrong in my R set up.
>>
>> Any help will be greatly appreciated.
>>
>> Regards.
>> Manfred E.
>>
>> ________________________________
>>
>> AVISO DE CONFIDENCIALIDAD: La informaci?n contenida en este mensaje es estrictamente confidencial, y est? destinada para uso exclusivo de su destinatario. El BANCO NACIONAL y sus subsidiarias no se hacen responsables por su copia, divulgaci?n o distribuci?n a terceros, y se reserva el derecho de interponer las acciones administrativas y/o judiciales que correspondan por los da?os y perjuicios que su difusi?n no autorizada ocasione.
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
> _______________________________________________
> R-SIG-Finance using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list