qis.estimate_acf_from_path

qis.estimate_acf_from_path(path, nlags=10)[source]

standard sample autocorrelations and partial autocorrelations of one series.

Calls statsmodels acf (full-sample mean and variance, adjusted=False) and pacf (its default Yule-Walker method) at lags 1 to nlags. NaNs are dropped first, so the observations on either side of a gap become adjacent: a lag then counts non-missing observations, not rows of the index.

Parameters:
  • path (Series | ndarray) – one series, as a Series or a 1-d ndarray

  • nlags (int) – number of lags K

Returns:

(acf, pacf), each indexed by lag 1 to nlags; all NaN unless more than 2 * nlags finite observations remain

Return type:

Tuple[Series, Series]