1
$\begingroup$

I am playing around with SP500 data from the MASS package. From observation of the ACF and PACF there seem to be no significant autocorrelation. Now I want to model the volatility of the returns but I also want a mean equation. I'm not sure how I will get my mean equation as the ACF and PACF suggest that I can't use MA or AR terms in my mean equation.

Also, applying the auto.arima function from the forecast package yields an ARIMA(3,0,5) model. I am confused with such results as the ACF/PACF do not even show significance.

I am using the Box-Jenkins approach in my project and it wouldn't make sense to say that there are 3 AR and 5 MA terms when the ACF and PACF don't support what I say. I need to be able to explain why I am choosing this rank.

$\endgroup$
  • $\begingroup$ Did you manage to understand why the auto-arima function chooses the particular lag structure compared to all other possibilities? Perhaps these lags have low but comparatively higher correlation? Perhaps exactly because ACF is low, the auto.arima function generated a many-lags structure in order to "compensate" for the low ACF? (in the same spirit with blindly increasing the number of regresors in a linear regression to increase the R-square, although this may create a useless mean equation with good fit? $\endgroup$ – Alecos Papadopoulos Oct 6 '13 at 20:24
  • $\begingroup$ I think I understood where I went wrong thanks to Rob. $\endgroup$ – ankc Oct 7 '13 at 10:22
4
$\begingroup$

Here are the ACF and PACF plots:

library(MASS)
library(forecast)
tsdisplay(SP500)

enter image description here

So contrary to what the question states, there are significant correlations at many lags. Naturally auto.arima() tries to model the correlation structure as best it can. Because the default maximum number of AR and MA parameters are both set to 5, it cannot handle all the significant correlations seen here, but it does quite a good job as is seen when the residuals are plotted.

fit <- auto.arima(SP500)
tsdisplay(residuals(fit))

enter image description here

You can get a better model by making auto.arima() work harder:

fit <- auto.arima(SP500, approximation=FALSE, stepwise=FALSE, max.order=10)

This returns an ARIMA(5,0,2) with better residual plots than those shown above and which passes a Ljung-Box test:

> Box.test(residuals(fit), lag=20, fitdf=8, type="Ljung")

    Box-Ljung test

data:  residuals(fit)
X-squared = 17.365, df = 12, p-value = 0.1364

The model chosen has the smallest AICc value for all ARIMA($p,0,q$) models with $p\le 5$ and $q\le 5$.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Oh I used the default acf function in R and the lags didn't seem to be significant. In the book Introductory Time Series with R the author says that usually return data tend to be uncorrelated but the squared return is correlated. If this is true how can we use AR terms or MA terms? thanks your illustration made things clearer. $\endgroup$ – ankc Oct 7 '13 at 10:20
  • $\begingroup$ When you make a Ljung-Box test what statistic should you look at for conclusion?I tried using this function fit <- auto.arima(SP500, approximation=FALSE, stepwise=FALSE, max.order=10) and my computer took around 2mins to do it, is that normal? $\endgroup$ – ankc Oct 7 '13 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.