CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

GARCH Models in R

Afficher le cours

Instructions

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

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# 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
Modifier et exécuter le code