R에서의 GARCH 모델
Kris Boudt
Professor of finance and econometrics
그렇다면 상수 평균, 표준 GARCH(1,1), 학생 t 분포 지정이 적절합니다:
garchspec <- ugarchspec(mean.model = list(armaOrder = c(0, 0)),
variance.model = list(model = "sGARCH"),
distribution.model = "std")
setfixed()setbounds()사양 및 추정
garchspec <- ugarchspec(mean.model = list(armaOrder = c(0, 0)),
variance.model = list(model = "sGARCH"),
distribution.model = "std")
garchfit <- ugarchfit(data = EURUSDret, spec = garchspec)
추정 결과
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, shape = 6을 알고 있다면, 추정에 그 값을 고정합니다.ugarchspec 객체에 setfixed() 사용setfixed(garchspec) <- list(alpha1 = 0.05, shape = 6)
결과
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))
보유한 정보를 활용하세요:
GARCH 동학을 현실적으로 설정:
sd(EURUSDret) # returns a value of 0.006194049

ugarchspec()의 variance.model에서 variance.targeting = TRUE로 설정합니다.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
R에서의 GARCH 모델