Get startedGet started for free

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.

This exercise is part of the course

GARCH Models in R

View Course

Exercise instructions

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

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# 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 and Run Code