Exercises

  1. Download Historical Data

    • Get the code for S & P 500 Index using the Yahoo Finance database either from the Quandl website or the R console.
    • Download historical close prices for the years 2010 -- 2014 and save them in the variable close_prices.
  2. Visual Inspection of the Data

    • Plot the close prices as a linechart. What kind of process would be appropriate?
    • Plot the logarithm (log()) of the close prices as a linechart. What kind of process would be appropriate?
    • Calculate the log - returns and save your results in the variable log_returns.
    • Plot the log - returns. What kind of process would be appropriate?
    • Plot the acf acf() of the log - returns and the squared log - returns.
  3. Fitting a GARCH Model to Historical Data

    • Use the garchFit() function to fit a GARCH(1,1) model to the log - returns.
    • Replace the normal distribution with a Student - t - distribution.
    • Which model explains the data better?
  4. Forecasting Volatility (Homework)

    • Write your own function vola_forecast() for k - step ahead forecasts \(\sigma_T(k)\), with forecast origin \(T\), of the volatility for the two models from exercise 3.
    • Note:
      • You can check your results by comparing them with the output from the predict() function in package fGarch which returns values of \(\sigma_T(k)\) .
      • You can use the following forecasting relations for a GARCH(1,1) model:
vola_forecast <- function(ARGUMENTS) {

  Body 

}