sigmaquant.research.autocorr.bartlett#
- sigmaquant.research.autocorr.bartlett(values, lag, epsilon=0.05)#
Bartlett test for autocorrelation at a specific lag.
The test evaluates the null hypothesis that the autocorrelation at a given lag is equal to zero.
H0: rho_k = 0 H1: rho_k != 0
The variance of the sample autocorrelation is estimated using Bartlett’s formula:
Var(rho_k) ≈ (1 + 2 * sum_{j=1}^{k-1} rho_j^2) / n
The resulting Z-statistic is asymptotically standard normal.
- Parameters:
values (ArrayLike) – Time series observations.
lag (int) – Lag at which the autocorrelation is tested.
epsilon (float, default 0.05) – Significance level used for the rejection decision.
- Returns:
Structured container with the estimated autocorrelation, test statistic, p-value, and rejection decision.
- Return type: