非常態 GARCH 模型的估計
函式 ugarchfit() 會同時估計平均、變異數與分配的所有參數。一般做法是使用偏斜的 student t 分配。此時你也需要估計 skew 與 shape 兩個參數 \(\xi\) 與 $\nu$。
在這個練習中,你要對名為 ret 的模擬報酬序列,配適使用偏斜 student t 分配的 GARCH 模型。用來模擬的真實模型參數為:
list(mu = 0, ar1 = 0, ma1 = 0, omega = 6*10^(-7), alpha1 = 0.07, beta1 = 0.9,
skew = 0.9, shape = 5)
你會發現估計得到的參數和真實參數相當接近。估計值與真實值的差異稱為估計誤差。對於長期的時間序列,這個誤差通常很小。
本練習屬於課程
R 的 GARCH 模型
練習說明
- 繪製報酬序列
ret,並留意其中的大幅負報酬。 - 完成設定,指定使用偏斜 student t 分配的 GARCH 模型。
- 估計該模型。
- 從取得的
ugarchfit物件中擷取係數。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Plot the return series
___
# Specify the garch model to be used
garchspec <- ___(mean.model = list(armaOrder = c(0,0)),
variance.model = list(model = "sGARCH"),
___ = ___)
# Estimate the model
garchfit <- ___(data = ___, spec = ___)
# Inspect the coefficients
___(___)