BaşlayınÜcretsiz Başlayın

Estimation of GJR garch model

Just like any GARCH model, the GJR GARCH model is used to predict volatility. We use this model now to predict the volatility of the daily returns of Microsoft over the period 1999 till 2017.

These returns are available in the console as the variable msftret. We have already computed the standard GARCH volatility predictions for you. They are available in the object sgarchvol.

Bu egzersiz

GARCH Models in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Specify the GJR garch model with a skewed student t distribution.
  • Estimate the model.
  • Compare the GJR GARCH volatility with sgarchvol.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Specify the GJR GARCH model
garchspec <- ___(mean.model = list(armaOrder = c(0,0)),
                 ___ = list(model = ___),
                 ___ = ___)

# Estimate the model and compute volatility
gjrgarchfit <- ___(data = ___, spec = ___)
gjrgarchvol <- ___(___)

# Compare volatility
plotvol <- plot(abs(msftret), col = "grey")
plotvol <- addSeries(___, col = "red", on=1)
plotvol <- addSeries(sgarchvol, col = "blue", on=1)
plotvol
Kodu Düzenle ve Çalıştır