MulaiMulai sekarang secara gratis

Standard deviation on subsamples

In the financial crisis of 2008–2009 the volatility was substantially higher than average. Let's get our hands dirty with analyzing the volatility of the daily returns for the S&P 500 index. You will see that the standard deviation over the complete sample can be substantially different from the standard deviation on subsamples. Recall that standard deviations on daily returns give daily standard deviations. They are annualized by multiplying them using the square-root-of-time rule.

The daily returns sp500ret you calculated in the previous exercise are available in your workspace.

Latihan ini adalah bagian dari kursus

GARCH Models in R

Lihat Kursus

Petunjuk latihan

  • Compute the daily standard deviation for the complete sample.
  • Compute the annualized volatility for the complete sample.
  • Compute the annualized volatility for the year 2009 and the year 2017.
  • The variance is the square of the volatility. Verify that this has already been done for you.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Compute the daily standard deviation for the complete sample   
___(___)

# Compute the annualized volatility for the complete sample
___(___) * ___(___)

# Compute the annualized standard deviation for the year 2009 
___(___) * ___(sp500ret["2009"])

# Compute the annualized standard deviation for the year 2017 
___
Edit dan Jalankan Kode