Autocorrelation is a measure of how correlated a signal is with a delayed version of itself. For example, one or more previous observation of a stock price may be correlated (or change together) with the next observation of the stock price. If this was the case, we would say that the stock price was influenced by itself according to some lag or delay. We could then model the future stock price by a delayed version of itself at the specific lags indicated as highly correlated.
To measure the autocorrelation of a variable xt with a delayed version of itself (or a version with a lag) xs, we can utilize the autocorrelation function (ACF), defined as follows:
Here, s could represent any lagged version of x. Thus, we can calculate ...