Question: How do I calculate the effective sample size of a time series under overlapping observations?
By overlapping observations of $x_t$ where the overlap is of length $k$ I mean a case where $x_t=\sum_{\tau=t-k+1}^t \xi_\tau$ where $\xi_\tau$ is some random process. Hence, $x_t$ and $x_{t-\kappa}$ measure partly the same thing for $\kappa<k$; they "overlap". An example would be measuring monthly financial returns every day. The monthly return $x_t$ of today overlaps with the monthly return of yesterday $x_{t-1}$ to a large degree: given a month with 30 trading days, 29 daily returns $\xi_{t-29},\dots,\xi_{t-1}$ constitute both $x_t$ and $x_{t-1}$, while only $\xi_{t}$ and $\xi_{t-30}$ make $x_t$ and $x_{t-1}$ differ. (How many trading days a month has depends on the market.)
codapackage, and it seems to base the estimation of the effective number of observations on comparing the long-run variance estimated adjusting for autocorrelation (via fitting an AR model) with the naive estimate – as simple as that. So the answer would be to take $n\frac{ \hat\sigma^2 }{ \tilde\sigma^2 }$ with $n$ being the nominal number of overlapping observations, $\hat\sigma^2$ the naive estimate and $\tilde\sigma^2$ the one adjusted for autocorrelation. – Richard Hardy Mar 22 '23 at 18:46