Thursday, July 24, 2014

ARIMA model for the FTSE 100 index in R

The index value for FTSE 100 is downloaded from Google Finance using the R package Quantmod. Here is the price data for the period 2004-2013.



Next, I calculate the return on the index. The return seems to be stationary around zero, with a significant increase in volatility during the end of 2008.


A histogram of the price:
And of the return:
The return has a mean close to zero, a negative skewness of -0,16 and a very high kurtosis, 9,01. The descriptive statistics is calculated using the describe function from the psych library. The Jarque-Bera test rejects the null hypothesis of normality. The Jarque-Bera test is calculated using the tseries library.


Observations 2608
Mean 0
Standard deviation 0,01
Median 0
Min -0,9
Max 0,9
Skewness -0,16
Kurtosis 9,01

The autocorrelation function shows a that there is a significant amount of autocorrelation in the time series, although the magnitude of the autocorrelation is small.

The partial autocorrelation fuction is also significant for the first four lags. Even though the autocorrelations are significant, they are quite small.

What ARIMA model should we use to correct for the autocorrelation? A good description of the model selection can be found here.
The autocorrelation function (ACF) plays the same role for MA terms that the PACF plays for AR terms--that is, the ACF tells you how many MA terms are likely to be needed to remove the remaining autocorrelation from the differenced series. If the autocorrelation is significant at lag k but not at any higher lags--i.e., if the ACF "cuts off" at lag k--this indicates that exactly k MA terms should be used in the forecasting equation. In the latter case, we say that the stationarized series displays an "MA signature," meaning that the autocorrelation pattern can be explained more easily by adding MA terms than by adding AR terms.
Based on the ACF and partial ACF plots, it seems like we should use an ARIMA(4, 0, 4) model.

Compared to the disturbution of the plain returns, the normality of the error terms seems to have improved. The kurtosis has descreased somewhat, but the skewness has actually gone up. The Jarque-Bera test is somewhat improved. The X-squared is 7168, compared to 8855 of the plain returns.



ReturnsARIMA(4,0,4)
Observations26082608
Mean0,02 %0,02 %
Standard deviation1,19 %1,12 %
Median0,02 %0,06 %
Min-0,9-0,9
Max0,90,9
Skewness-0,16-0,4
Kurtosis9,018,07

And finally, here is the autocorrelation function for the residuals of the ARIMA(4,0,4) specification. As you can see, there are still some significant autocorrelations starting at the 25th lag.


No comments:

Entertaining Blogs - BlogCatalog Blog Directory
Bloggtoppen.se