Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Drawing an Autocorrelation Plot The following high level steps are followed to draw an autocorrelation plot: 1.

Calculate the number of lags in the dataset The lags are the elapsed time between different time instances. Typically lag (h) =0,1,2,3N where N is the total number of observations in a dataset. The number of lags to be considered for analysis will depend on the type of analysis we want to carry out. For instance, if we want to investigate the cyclic pattern in the data, the maximum number of lags to be considered will be half the total number of observations (N/2) in the dataset. 2. Determine the autocorrelation for each lag The correlation between the data points has to be calculated separately for each lag. Autocorrelation coefficient for lag h is represented by Rh=Ch/C0 Where
N-h

Ch=1/N [(Yt-) (Yt+h-)] t=1


N

C0=1/N [(Yt-) ] t=1 Where Rh is the autocorrelation coefficient Ch is the autocovariance function C0 is the variance function Yt is the data point at instance t Yt+h is the data point at instance t+h is the mean of the dataset

3. Calculate the confidence interval The confidence interval is calculated to statistically validate if the correlation is significant. This will reveal if any non-randomness exists in a given time lag. The confidence interval is decided based on the significance level. For a 5 percent significance level, the confidence interval is 95 percent. a. Calculate the standard error (SE) SE (R1) =1/N SE(Rh) =

h-1 i=1

1+2Ri2 for h>1

b. Calculate the confidence intervals C.I.= (+/-) Z(1-/2) SE(Rh) 4. Identify the lags for which autocorrelations are significant Analyze the autocorrelation plot to identify the lags for which the autocorrelation coefficients are outside the confidence interval. Check if any particular pattern following an upward or downward trend, seasonal pattern, etc., is evidenced in the data.

Figure 1

The above illustration shows an autocorrelation for sample data. We can make the following important observations from the autocorrelation plot: a. The autocorrelation coefficients from lag 0 to 13 are statistically significant. b. There is a seasonal pattern observed in the data. The pattern is repeated after every twelfth lag. The autocorrelation analysis involves some lengthy calculations if carried out manually. This can be minimized using macros in Microsoft Excel. However, the effort can prove worth it in terms of returns from this analysis.

You might also like