開始使用免費開始

變異數目標化(Variance targeting)

金融報酬率的波動性會隨時間群聚:高於平均的波動期之後,常接著出現低於平均的波動期。長期的預測是:

  • 當波動性很高時,它會下降並回到長期平均。
  • 當波動性很低時,它會上升並回到長期平均。

在估計 GARCH 模型時,我們可以利用波動性的均值回歸特性,採用波動性目標化。也就是以使 GARCH 模型所隱含的長期波動性等於樣本標準差的方式,來估計 GARCH 參數。

現在把這個方法套用到 EUR/USD 的報酬率。

本練習屬於課程

R 的 GARCH 模型

檢視課程

練習說明

  • 調整 GARCH 規格以啟用變異數目標化。
  • 估計 GARCH 模型。
  • 使用 uncvariance() 計算 GARCH 所隱含的長期標準差。
  • 驗證四捨五入後的數值是否等於樣本標準差。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Complete the specification to do variance targeting
garchspec <- ugarchspec(mean.model = list(armaOrder = c(0,0)),
                        variance.model = list(model = "sGARCH",
                                             ___ = ___),
                        distribution.model = "std")

# Estimate the model
garchfit <- ___(data = EURUSDret, spec = garchspec)

# Print the GARCH model implied long run volatility
sqrt(___(___))

# Verify that it equals the standard deviation (after rounding)
all.equal(sqrt(uncvariance(garchfit)), ___(EURUSDret), tol = 1e-4)
編輯並執行程式碼