Các mô hình GARCH trong R
Kris Boudt
Professor of finance and econometrics
Vậy trung bình hằng, GARCH(1,1) chuẩn với phân phối t-student là đặc tả phù hợp:
garchspec <- ugarchspec(mean.model = list(armaOrder = c(0, 0)),
variance.model = list(model = "sGARCH"),
distribution.model = "std")
setfixed()setbounds()Đặc tả và ước lượng
garchspec <- ugarchspec(mean.model = list(armaOrder = c(0, 0)),
variance.model = list(model = "sGARCH"),
distribution.model = "std")
garchfit <- ugarchfit(data = EURUSDret, spec = garchspec)
Kết quả ước lượng
coef(garchfit)
mu omega alpha1 beta1 shape
-3.562136e-05 8.005123e-08 3.097322e-02 9.674496e-01 8.821902e+00
alpha1 = 0.05 và shape = 6: hãy áp đặt các giá trị đó khi ước lượng.setfixed() trên đối tượng ugarchspecsetfixed(garchspec) <- list(alpha1 = 0.05, shape = 6)
Kết quả
garchfit <- ugarchfit(data = EURUSDret, spec = garchspec)
coef(garchfit)
mu omega alpha1 beta1 shape
-4.142922e-05 2.061772e-07 5.000000e-02 9.489622e-01 6.000000e+00
setbounds().setbounds(garchspec) <- list(alpha1 = c(0.05, 0.2), beta1 = c(0.8, 0.95))
Hãy dùng thông tin bạn có:
để làm động học GARCH thực tế hơn:
sd(EURUSDret) # trả về 0.006194049

variance.targeting = TRUE trong variance.model của ugarchspec():garchspec <- ugarchspec(mean.model = list(armaOrder = c(0,0)),
variance.model = list(model = "sGARCH",
variance.targeting = TRUE),
distribution.model = "std")
garchfit <- ugarchfit(data = EURUSDret, spec = garchspec)
all.equal(uncvariance(garchfit), sd(EURUSDret) ^ 2, tol = 1e-4)
TRUE
Các mô hình GARCH trong R