Forecasting: Principles and Practice, 3rd edition by Hyndman and Athanasopoulos states in section 2.8, Autocorrelation that, for trend in data the autocorrelation function has positive values that slowly decrease as lag increases.

The definition for autocorrelation function for lag $k$ is defined here as -

$r_k=\frac{\sum_{t=k+1}^{T}{(y_t-\overline y)(y_{t-k}-\overline y)}}{\sum_{t=1}^T (y_t-\overline y)^2}$, where $T$ is the length of the time-series.

Can anyone give a rigorous proof and intuitive sense as to why it might be so, indifferent of the type of trend that the series might have?

P.S.: I am new to time-series; however, comfortable with maths.


2 Answers 2


I had the same doubt as you since I was introduced to time series analysis by the same book. Although it is useful to have an autocorrelation coefficient defined in that way, it may be a good idea to give some clarification in the book itself.

So, yes, as you said, the autocorrelation function decreases over the lag axis due to the fact that the global sample variance in the denominator remains the same and that - given a trended series - the actual sample variances of both the series used for the autocorrelation decrease w.r.t. the original one, since a bigger and bigger chunk of the variability at the extreme points of the series is not considered.

My idea is that this is useful mainly to distinguish a trended series from one that hovers around a constant value: without this artificial behaviour of the autocorrelation calculation we would not be able to distinguish the two in the ACF, since they would both have a constant ACF of about 1. This is not the case with the formulation using global sample variance instead of the actual sample variances of the lagged and cut versions.

Obviously, a non-linear trend induces a decreasing ACF either way.


Here is the full quote from the section you reference (bold added):

When data have a trend, the autocorrelations for small lags tend to be large and positive because observations nearby in time are also nearby in value. So the ACF of a trended time series tends to have positive values that slowly decrease as the lags increase.

Surely that gives the intuition. As the lags increase, the values are further apart in both time and value due to the trend.

  • 1
    $\begingroup$ The OP is asking for a rigorous proof and an intuition. You have provided the latter here, but not the former. Would you be willing to update your answer? $\endgroup$
    – Galen
    Commented Mar 8, 2022 at 4:45
  • $\begingroup$ @RobHyndman will that be the case for a timeseries that is simply a straight line? Will the auto-correlations then, not be 1 for any lag, allowed by the length of the series? Although this is an extreme case, it is simple enough to use as a mental model while considering trends. $\endgroup$ Commented Jul 21, 2022 at 1:57
  • 1
    $\begingroup$ Asymptotically, yes. But not for finite samples. Using R, try acf(1:n) for different values of n to demonstrate. $\endgroup$ Commented Jul 21, 2022 at 23:42
  • $\begingroup$ @RobHyndman I did with Python a = pd.Series(np.arange(30)); pd.Series([a.autocorr(lag=i) for i in range(25)]) and all came out to be 1. However, I agree with the point that for finite linear series a shifted version will have a lower length and the corresponding term in numerator $y_{t-k}-\overline{y}$ gets affected while the denominator does not because it still uses the variance of the original series. However, should we not consider the denominator to be the $\sqrt{\text{var(original)var(shifted)}}$? I think this is why pandas results give 1. $\endgroup$ Commented Jul 22, 2022 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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