ComenzarEmpieza gratis

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.

Este ejercicio forma parte del curso

GARCH Models in R

Ver curso

Instrucciones del ejercicio

  • 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.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# 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")
Editar y ejecutar código