更適合 EUR/USD 報酬的模型
在前一個練習中,你已經分析了以偏態 student t 分配的 AR(1) GJR GARCH 模型(用於每日 EUR/USD 報酬)之估計參數的統計顯著性。結論是我們應該簡化所使用的 GARCH 模型。因此,我們改用常數平均、標準 GARCH 模型,且採用 student t 分配。我們將平均數固定為 0,並使用變異數鎖定(variance targeting)。
本練習屬於課程
R 的 GARCH 模型
練習說明
- 完成程式碼,以估計常數平均、標準 GARCH 模型,使用 student t 分配與變異數鎖定。
- 使用
setfixed()強制平均參數等於 0。 - 估計模型。
- 以視覺化方式檢查這些變更是否導致的波動度序列與使用
flexgarchfit的結果相近。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Specify model with constant mean, standard GARCH and student t
tgarchspec <- ugarchspec(mean.model = list(armaOrder = ___),
variance.model = list(model = ___, variance.targeting = ___),
distribution.model = ___)
# Fix the mu parameter at zero
___(tgarchspec) <- list("mu" = 0)
# Estimate the model
tgarchfit <- ___(data = EURUSDret, spec = tgarchspec)
# Verify that the differences in volatility are small
plot(sigma(___) - ___(flexgarchfit))