IniziaInizia gratis

Standardized returns

A complete GARCH model requires to make an assumption about the distribution of the standardized returns. Once the model has been estimated you can verify the assumption by analyzing the standardized returns.

In this exercise your work begins after the estimation. The output from estimating the GARCH model using ugarchfit() is available as the variable garchfit in the console. The analyzed return series is available as the variable ret.

Questo esercizio fa parte del corso

GARCH Models in R

Visualizza il corso

Istruzioni dell'esercizio

  • Use the method residuals() to compute the standardized returns.
  • Do the same using the methods fitted() and sigma() to compute the standardized returns.
  • Load the package PerformanceAnalytics and use chart.Histogram to plot the histogram of the standardized returns, together with the normal and actual density plots.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Compute the standardized returns
stdret <- ___(garchfit, ___ = ___)

# Compute the standardized returns using fitted() and sigma()
stdret <- (ret - ___(garchfit)) / ___

# Load the package PerformanceAnalytics and make the histogram
___
___(stdret, methods = c("add.normal","add.density" ), 
                colorset = c("gray","red","blue"))
Modifica ed esegui il codice