Confidence intervals for autocorrelation function Given a time series data sample I have computed autocorrelation coefficients for various lags, the result looks something like this

How do I compute the confidence intervals around the sample autocorrelation curve?
The reason for that is to see if another autocorrelation curve computed from samples generated by some model is within those confidence intervals.
 A: A quick google search with "confidence intervals for acfs" yielded
Janet M. Box-Steffensmeier, John R. Freeman, Matthew P. Hitt, Jon C. W. Pevehouse: Time Series Analysis for the Social Sciences.
In there, on page 38, the standard error of an AC estimator at lag k is stated to be
$AC_{SE,k} = \sqrt{N^{-1}\left(1+2\sum_{i=1}^k[AC_i^2] \right)}$
where $AC_i$ is the AC esimate at lag i and N is the number of time steps in your sample. This is assuming that the true underlying process is actually MA. Assuming asympotic normality of the AC estimator, you can calculate the confidence intervals at each lag then as
$CI_{AC_{k}} = [AC_{k} - 1.96\times\dfrac{AC_{SE,k}}{\sqrt{N}}, AC_{k} + 1.96\times\dfrac{AC_{SE,k}}{\sqrt{N}}]$.
For some further info, see also this and this.
A: When the ACF is estimated from data I think also the error should be directly computed from the same data. I think that is generally the safest and most conservative approach. I would just store the resulting products of the signal with itself after each shift in the row of a matrix. Then you have the full distribution of values at each shift. Computing the column-wise average and the std/sem gives you a estimate of the AC and its variation. Bootstrapping and other resampling procedures on that matrix enable you to estimate the confidence intervals. This has the advantage that there are no special assumptions to be made and it can always be made compatible with your specific AC computation (normalization, padding etc.). 
