Modele GARCH w R
Kris Boudt
Professor of finance and econometrics
Wzór na standaryzowane zwroty
$$ Z_{t} = \frac{R_{t} - \hat{\mu_{t}}}{ \hat{\sigma_{t}}} $$


Trzecia weryfikacja poprawności modelu:
Dlaczego?
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)

Reguła: wartość p poniżej 5% wskazuje, że użyty model jest niepoprawny.
Box.test() z 3 argumentami:type = "Ljung-Box"Przykład:
Box.test(abs(stdmsftret), 22, type = "Ljung-Box")
Test na bezwzględnych standaryzowanych zwrotach:
Box.test(abs(stdmsftret), 22, type = "Ljung-Box")
Box-Ljung test
data: abs(stdmsftret)
X-squared = 25.246, df = 22, p-value = 0.2855
Uwaga: wartość p wynosi 28,55% > 5%. Nie możemy odrzucić, że: $$ H_0: Corr(|Z_t|,|Z_{t-1}|) = Corr(|Z_t|,|Z_{t-2}|) = ... = Corr(|Z_t|,|Z_{t-22}|) = 0 $$
Modele GARCH w R