LoslegenKostenlos loslegen

Change estimation sample

There can be several causes for rejecting the validity of the GARCH model. It could be a wrong assumption for the mean, the variance or the distribution. It could also be that the time series of returns cannot be described by one set of GARCH parameters. In fact, given the dynamic nature of financial markets, it is realistic to expect that GARCH model parameters change through time. Let's therefore re-estimate our GARCH model on the 2500 most recent EUR/USD returns instead of doing the analysis on all 4961 returns.

Diese Übung ist Teil des Kurses

GARCH Models in R

Kurs anzeigen

Anleitung zur Übung

  • Use the function tail() to estimate the GARCH model on the last 2500 observations
  • Compute the standardized returns
  • Do the Ljung-Box test that all autocorrelations of order 1,…,22 are zero.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Estimate the model on the last 2500 observations
tgarchspec <- ___( mean.model = list(armaOrder = c(0,0)),
                        variance.model = list(model = "sGARCH"),
                        distribution.model = "std")
tgarchfit <- ___( data = ___(EURUSDret, ___) , spec = tgarchspec)

# Compute standardized returns
stdEURUSDret <- ___(tgarchfit, standardize = TRUE)

# Do the Ljung-Box test on the absolute standardized returns
___(abs(stdEURUSDret), 22, type = "Ljung-Box")
Code bearbeiten und ausführen