# How to use cross validation to estimate autocorrelation?

I have a stationary time series and I want to calculate the autocorrelation coefficient of order 1. For that I use OLS. I know the autocorrelation parameters change over the time. Thus it is not trivial to fix a window length for the regression. Moreover I can easily do over-fitting by finding the windows which optimize a criterion such as mean squared error, for example.

Can I use cross validation to find the optimal window length?

• How is it possible for a time series to be both "stationary" and to have a changing autocorrelation? – whuber Jan 11 '12 at 16:25
• Sorry, the autoccorelation is assumed to move in ]-1;1[; – grant Jan 13 '12 at 10:23
• So, just to be clear: you have a nonstationary time series for which you wish to estimate a moving autocorrelation coefficient. For that, you use a moving window OLS procedure. Your question concerns finding an "optimal" window length. Right? Also, what do you wish to optimize? Make the bias small? Minimize estimation variance? Create reliable predictions? Estimate a parameter in a model for the change of autocorrelation? – whuber Jan 13 '12 at 13:47
• thanks for your answers.Your right. I want to minimize estimation variance. Since i use moving windows, my AR(1) parameter move over the time. I want to know if there exist a procedure to choose the windows length wich minimize the estimation variance whithout overfiting i.e choose the best windows in sample. – grant Jan 13 '12 at 17:37