GARCH Models in R
Kris Boudt
Professor of finance and econometrics
Formula standardized returns
$$ Z_{t} = \frac{R_{t} - \hat{\mu_{t}}}{ \hat{\sigma_{t}}} $$
Third check of model validity:
Why?
acf()
garchspec <- ugarchspec(mean.model = list(armaOrder = c(1, 0)),
variance.model = list(model = "gjrGARCH"),
distribution.model = "sstd")
garchfit <- ugarchfit(data = msftret, spec = garchspec)
stdmsftret <- residuals(garchfit, standardize = TRUE)
acf(abs(msftret), 22)
acf(abs(stdmsftret), 22)
Rule of thumb: p-value less than 5% indicates that the model used is not valid.
Box.test()
with 3 arguments:type = "Ljung-Box"
Example:
Box.test(abs(stdmsftret), 22, type = "Ljung-Box")
Test on absolute standardized returns:
Box.test(abs(stdmsftret), 22, type = "Ljung-Box")
Box-Ljung test
data: abs(stdmsftret)
X-squared = 25.246, df = 22, p-value = 0.2855
Note: p-value is 28.55% > 5%. We cannot reject that: $$ H_0: Corr(|Z_t|,|Z_{t-1}|) = Corr(|Z_t|,|Z_{t-2}|) = ... = Corr(|Z_t|,|Z_{t-22}|) = 0 $$
GARCH Models in R