Workspace / Research tools
Portfolio research

Autocorrelation and Effective Sample Size Calculator

A thousand return observations do not necessarily contain the same information as a thousand independent observations. If nearby returns tend to move together, simple sample counts can exaggerate how much independent variation a history contains. This calculator measures centered lag-one autocorrelation and translates it into a clearly labeled AR(1) effective-count approximation. It is a diagnostic for equally spaced chronological data, helping you identify dependence that deserves further analysis before treating every sampled period as an independent experiment.

Enable JavaScript to edit assumptions, calculate and compare a baseline locally. The formula and methodology below remain available without JavaScript.

Use the global mean for both adjacent values

For return observations r₁ through rN with overall mean μ, calculate ρ₁ = Σ from t=2 to N [(rₜ − μ)(rₜ₋₁ − μ)] / Σ from t=1 to N (rₜ − μ)². The AR(1) approximation is Nraw = N × (1 − ρ₁)/(1 + ρ₁). The displayed effective count is clipped to the interval from one through N, while the unclipped approximation remains visible. A constant series has zero denominator and undefined autocorrelation.

A four-observation arithmetic check

For the ordered series 1%, 2%, 3%, and 4%, the mean is 2.5%. Centered adjacent products total 1.25 and centered squared values total 5, so lag-one autocorrelation is 0.25. The effective-count approximation is 4 × 0.75/1.25 = 2.4. Reordering the same values changes adjacent products and can change the result even though the sample mean and ordinary standard deviation remain unchanged.

The approximation has a narrow interpretation

An AR(1)-like stationary dependence pattern is an assumption, not something established by a single correlation estimate. Negative autocorrelation can produce an unclipped count above N; the clipped display is a conservative interface convention, not a universal statistical identity. Higher-lag dependence, changing volatility, and structural breaks are not resolved here. This output does not automatically correct a confidence interval or a backtest p-value. Inspect the actual sequence and use an appropriate dependence-aware method for any later inference.

Primary documentation

Your research workspace

Save selected inputs and research notes explicitly in this browser. Compare assumptions and restore a saved setup without submitting a trade. JavaScript enables the controls.

Find a tool or research page