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

Mean squared prediction errors

The GJR GARCH model is a generalization of the GARCH model. It should thus lead to a better fit in terms of lower Mean Squared Errors (MSE). Let's verify this on the Microsoft returns msftret for which garchfit corresponds to the estimation with the standard GARCH(1,1) model, while gjrfit is when the GJR model is used. Remember that you can compute the vector with prediction errors \(e\) for the mean using the residuals() method. The prediction error for the variance equals the difference between \(e^2\) and the predicted GARCH variance.

Bu egzersiz

GARCH Models in R

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

Egzersiz talimatları

  • Compute the vector with prediction errors for the means using the residuals() method.
  • Complete the code for calculating the MSE for garchfit estimation output.
  • Compute the MSE for the gjrfit estimation output.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Compute prediction errors
garcherrors <- ___(garchfit)
gjrerrors  <- ___(gjrfit)

# Compute MSE for variance prediction of garchfit model
___((___(garchfit)___ - garcherrors^2)___)

# Compute MSE for variance prediction of gjrfit model
___
Kodu Düzenle ve Çalıştır