I'm very new to financial time series. I have a dataset containing the daily simple returns of the Dow Jones Industrial Average and I want to model a (univariate) GARCH model for the daily logreturns. I'm working in R.
First I transform the simple into log returns using
DJIA = log(DJIA_simple + 1). The Ljung-Box test says that the time series is not stationary, and when I take first differences the sample ACF and PACF are both 0 for all non-zero lags.
I want to use the
rugarch packages, but I don't know how to proceed. I think that I have two options, but I don't know the 'correct' one:
- First difference the data and call the
variance.model = list(model = "GARCH", garchOrder = c(1,1))
- Don't difference the data and call the
variance.model = list(model ="iGARCH", garchOrder = c(1,1)).
(After doing either of this, I run
garch_djia <- rugarch::ugarchfit(spec = spec, data = DJIA, solver.control = list(trace=0)).)
Note that I am only interested in a GARCH model; I do not care that much about an ARMA or ARIMA model for the mean. (But I don't think I need one since after differencing the time series looks like white noise to me, with mean 0.)
I am familiar with all the theory regarding time series, just not with actually modelling one in practice. Any help would be greatly appreciated.
EDIT: When I run
stats::Box.test(garch_djia@fit$residuals, lag = 4, type = "Ljung-Box", fitdf = 2), I get a p-value of 0.0001049 (similar results for other values of
fitdf, but I believe that for
GARCH(p, q) models the value of
fitdf needs to be the sum of
eps_t = (garch_djia@fit$residuals)/(garch_djia@fit$sigma) results in a variable with mean
-0.04487383 and variance
1.135489. Since we are modelling $a_t = \sigma_t \epsilon_t$ (with $a_t$ the residuals and $\epsilon_t \sim (0, 1)$), does this mean the model is 'good' because the mean and variance of
eps_t are relatively close to 0 and 1?