# What is the autocorrelation function of a time series arising from computing a moving standard deviation?

Say I have a time series of observations and I compute a measure of the variance of that time series as the standard deviation (SD) in a rolling window of width $w$ and that window is moved in single time steps over the series. Assume further that $w = \left \lceil{n/2}\right \rceil$, where $n$ is the number of observations, and that the window is right aligned; I have to observe $w = \left \lceil{n/2}\right \rceil$ values of the series before I start yielding moving window estimates of the SD of the time series.

Is there an expected form for the ACF of the new time series of SD values? I presume the dependence on previous values will relate to the window with $w$, but is the ACF of such a series related to the ACF of an $\mathrm{MA}(w)$ process?

### Background

I'm trying to think through the implications of deriving a time series of the variance of the original time series via moving windows. Having computed the derived series of SD values the next step that is commonly applied is to see if there is some trend in the derived series of SD values. As each value in the derived series depends to some extent on the previous values of the original series the values of the derived series are not independent. Thus a question that crops up frequently is how to account for that lack of independence.

Such computations (the moving windows) are often done to time series to look for evidence of indicators (increasing variance, increasing AR(1) coefficient) of impending threshold response (so-called critical transitions).

• Is anything known about the dependence in the series on which the moving standard deviation is computed? Is that the $\text{MA}(w)$ you mention? (it's not actually clear if that's intended to refer to the original series or the SD series, at least not to me). – Glen_b Mar 27 '14 at 10:40
• @Glen_b We could fit an $mathrm{MA}(q)$ to the original series, but I was more wondering if, because the original series is actually residuals after any trend has been estimated and removed, computing the mean in the moving window (in same way as I described above for the SD) would give something like an MA process and hence if there was a similar link such that the moving-SD would have ACF with similar properties to the MA process (signif correlations at lags up to $q$). – Gavin Simpson Mar 27 '14 at 13:50
• Having done a bit more background reading on models for the variance of a series, I wonder if it wouldn't be better all round just to fit that model than worry about the moving window bits. An (G)ARCH or stochastic volatility model seems appropriate for that at the moment, but I'm not sure how would show that variance increased with one of these models? But that's for a different Q&A. Still very much interested in any thoughts on the Q here as it is something one quite often in looking for early warning signals of impending transition in ecology. – Gavin Simpson Mar 27 '14 at 13:59
• It's a very interesting question, but you already seem to have at least as much insight as I could offer without spending a lot of time playing with it - and probably even after that. Maybe one of the time series people might have more to offer. – Glen_b Mar 27 '14 at 22:35
• Could we assume that the original series is formed of Gaussian(normal) random variables? – Alecos Papadopoulos Apr 4 '14 at 19:05

To avoid boundary effects take $(X_t)_{t \in\mathbb{Z}}$ to be a doubly infinite stationary process with mean 0. As I understand the rolling window computation we introduce the rolling variance estimator $$s_t^2 = \sum_{i=0}^w \frac{1}{w+1} X_{t-i}^2,$$ which is a backward moving average of the squared process. The standard deviation, being $s_t = \sqrt{s_t^2}$, is even more so a nonlinear filter. However, $(s_t^2)_{t \in \mathbb{Z}}$ is a causal linear filter of the squared process, and its ACF can therefore be derived from the ACF of $(X_t^2)_{t \in \mathbb{Z}}$. If the times series is a sequence of i.i.d. variables so is the squared process, in which case $(s_t^2)_{t \in \mathbb{Z}}$ is an MA$(w)$ process with all weights equal to $1/(w+1)$. Using a ARCH(1) model we can, on the other hand, find an example where the process itself is a white noise process, but the squared process is not. In fact, for the ARCH(1) model the ACF for the squared process coincides with the ACF for an AR(1) process, in which case the ACF for the rolling variance is the same as for a moving average of an AR(1) process.