Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

I want to fit an ARMA-GARCH model to my data using rugarch package in R.

First of all, I look at the acf and pacf:

install.packages("forecast")
library(forecast)
par(mfrow=c(2,1))
Acf(mydata,main="ACF",cex.axis=1.2,cex.lab=1.2,ci.type="ma")
Acf(mydata,type="partial",main="PACF",cex.axis=1.2,cex.lab=1.2)

this gives the following images:

acfandpa

As you can see, the first, second and third lag are not significant. The 4th and the 5th are significant. I decided to use two models for my mean equation: no model (since the intercept is not significant, I checked this) and a modified ARMA(5,5), where the ar1, ar2, ar3, ma1, ma2, mar3 coefficients and the mean are fixed to zero.

Let's consider only the second model. I estimate the model via

library(lmtest)
mymodel<-arima(mydata, order=c(5,0,5),include.mean=FALSE,fixed=c(0,0,0,NA,NA,0,0,0,NA,NA))

which gives the output

modeloutput

I get the p-values via

coeftest(mymodel)

which shows, that all coeff are highly significant.

Now I look at the residuals:

resid<-mymodel$residuals

par(mfrow=c(2,1))
Acf(resid,main="ACF of the residuals of the mean equation, \nmodified ARMA(5,5), zero mean",cex.axis=1.2,cex.lab=1.2)
Acf(resid,type="partial",main="PACF of the residuals of the mean equation, \nmodified ARMA(5,5), zero mean",cex.axis=1.2,cex.lab=1.2)

which gives the following images:

acresid

As you can see, I could "kill" the dependence at the low lag orders.

Now I do the joint estimation using the rugarch package.

  spec2<-ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)), 
    mean.model = list(armaOrder = c(5, 5), include.mean = FALSE), 
    distribution.model = "norm",fixed.pars=list(ar1=0,ar2=0,ar3=0,ma1=0,ma2=0,ma3=0))

    model2<-ugarchfit(spec=spec2,data=mydata)

I look at the output by just entering model2, the relevant parameter output is:

garch

1.Is it correct, that the coefficients are now different to the coefficients of the arima output?

I now look at

plot(model2,which=4)

and this gives the following image: acfresid

2.This is the acf of the observations, but I want to have the acf AND the pacf of the residuals. How can I get them? (not the acf of the standardized residuals of the volatility equation, this would be the 10th and the 11th plot).

share|improve this question
2  
Send a link of this thread to the package's author. He's fantastic and responds to my queries within 2 days; I'm sure he'll take a public thread even more seriously. –  Jase May 6 '13 at 14:03

1 Answer 1

1.Is it correct, that the coefficients are now different to the coefficients of the arima output?

It seems right that the ARMA coefficients are different. Indeed, in the second model, the GARCH component will capture fluctuations that the ARMA component will not have to capture, resulting in different ARMA parameter estimates.

2.This is the acf of the observations, but I want to have the acf AND the pacf of the residuals. How can I get them?

Here is a suggestion:

resid2 <- as.numeric(residuals(model2, standardize=FALSE))
Acf(resid2)
Acf(resid2, type = "partial")

As a complement, I would suggest to shun choosing the order of the ARMA and GARCH parts separately/sequentially. To choose the order of the model, it is preferable to consider the "full" models (i.e.., ARMA($p$, $q$)-GARCH($r$, $s$)) for varying choices of $p,q,r$ and $s$, and to chose the appropriate model by comparing models with likelihood ratio tests if the models are nested or with information criteria (e.g., AIC or BIC) if the models are not nested.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.