ComeçarComece de graça

Fixing GARCH parameters

The parameters of a GARCH model are estimated by maximum likelihood. Because of sampling uncertainty, the estimated parameters have for sure some estimation error. If we know the true parameter value, it is therefore best to impose that value and not to estimate it.

Let's do this in case of the daily EUR/USD returns available in the console as the variable EURUSDret and for which an AR(1)-GARCH model with skewed student t distribution has already been estimated, and made available as the ugarchfit object called flexgarchfit.

Este exercício faz parte do curso

GARCH Models in R

Ver curso

Instruções do exercício

  • Print the coefficient estimates of flexgarchfit.
  • Use the method setfixed() to specify the parameter restrictions that ar1 = 0 and skew = 1.
  • Estimate the model with the parameter restriction.
  • Complete the code to plot the two volatility series and note their similarity.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Print the flexible GARCH parameters
___

# Restrict the flexible GARCH model by impose a fixed ar1 and skew parameter
rflexgarchspec <- flexgarchspec
___(rflexgarchspec) <- list(___ = ___, ___ = ___)

# Estimate the restricted GARCH model
rflexgarchfit <- ugarchfit(data = ___,  spec = ___)

# Compare the volatility of the unrestricted and restriced GARCH models
plotvol <- plot(abs(EURUSDret), col = "grey")
plotvol <- addSeries(___(flexgarchfit), col = "black", lwd = 4, on=1 )
plotvol <- addSeries(___(rflexgarchfit), col = "red", on=1)
plotvol
Editar e executar o código