R 的 GARCH 模型
Kris Boudt
Professor of finance and econometrics
$$ \mu_{t} = \mu + \lambda \sigma^2_{t} $$
$\lambda > 0$ 為風險/報酬參數,表示每單位變異數風險帶來的期望報酬增量。
把 ugarchspec() 的 mean.model 參數,從 list(armaOrder = c(0, 0)) 改為 list(armaOrder = c(0, 0), archm = TRUE, archpow = 2):
garchspec <- ugarchspec(
mean.model = list(armaOrder = c(0, 0)),
variance.model = list(model = "gjrGARCH"),
distribution.model = "sstd")
garchspec <- ugarchspec(
mean.model = list(armaOrder = c(0, 0), archm = TRUE, archpow = 2),
variance.model = list(model = "gjrGARCH"),
distribution.model = "sstd")
估計
garchfit <- ugarchfit(data = sp500ret, spec = garchspec)
檢視平均式的估計係數
round(coef(garchfit)[1:2], 4)
mu archm
0.0002 1.9950
預測的平均報酬
$$ \hat{\mu}_{t} = 0.0002 + 1.9950 \hat{\sigma}^2_{t} $$
plot(fitted(garchfit))

$$ \mu_{t} = \mu + \rho(R_{t-1} - \mu) $$
$$ \mu_{t} = \mu + \rho(R_{t-1} - \mu) $$
$$ \mu_{t} = \mu + \rho(R_{t-1} - \mu) $$
以 sst 分配的 AR(1)-GJR GARCH 之設定與估計
garchspec <- ugarchspec(
mean.model = list(armaOrder = c(1, 0)),
variance.model = list(model = "gjrGARCH"),
distribution.model = "sstd")
garchfit <- ugarchfit(data = sp500ret, spec = garchspec)
AR(1) 模型估計值
round(coef(garchfit)[1:2], 4)
mu ar1
0.0003 -0.0292
1 階移動平均(MA(1))模型使用報酬相對其條件平均的偏離:
$$ \mu_{t} = \mu + \theta(R_{t-1} - \mu_{t-1}) $$
ARMA(1,1) 結合 AR(1) 與 MA(1):
$$ \mu_{t} = \mu + \rho(R_{t-1} - \mu) + \theta(R_{t-1} - \mu_{t-1}) $$
MA(1)
garchspec <- ugarchspec(
mean.model = list(armaOrder = c(0, 1)),
variance.model = list(model = "gjrGARCH"),
distribution.model = "sstd")
ARMA(1, 1)
garchspec <- ugarchspec(
mean.model = list(armaOrder = c(1, 1)),
variance.model = list(model = "gjrGARCH"),
distribution.model = "sstd")
R 的 GARCH 模型