The long run variance equals \(n\) times the asymptotic variance of the arithmetic mean of a short range dependent time series, where \(n\) is the length of the time series. It is used to standardize CUSUM Tests.
The long run variance is estimated by a kernel estimator using the bandwidth \(b_n = n^{1/3}\) and the flat top kernel $$k(x) = x * 1_{|x| < 0.5} + (2 - |x|) * 1_{0.5 < |x| < 1}$$. In the one dimensional case this results in:
$$\hat{\sigma}^2 = (1 / n) \sum_{i = 1}^n (x[i] - mean(x))^2 + (2 / n) \sum_{h = 1}^{b_n} \sum_{i = 1}^{n - h} (x[i] - mean(x)) * (x[i + h] - mean(x)) * k(h / b_n).$$
If x
is a multivariate timeseries the \(k,l\)-element of \(\Sigma\) is estimated by
$$\hat{\Sigma}^{(k,l)} = (1 / n) \sum_{i,j = 1}^{n}(x[i]^{(k)} - mean(x)^{(k)}) * (x[j]^{(l)} - mean(x)^{(l)}) * k((i-j) / b_n).$$