qis.estimate_acf_from_paths

qis.estimate_acf_from_paths(paths, nlags=10, is_pacf=True)[source]

partial (default) or ordinary sample autocorrelations of many paths, one column per path.

Each column is treated as estimate_acf_from_path() treats a series: NaNs are dropped and a column with no more than 2 * nlags finite observations is NaN. Note the default: is_pacf=True returns the partial autocorrelations; pass is_pacf=False for the ordinary ACF.

Parameters:
  • paths (ndarray | DataFrame) – paths in columns, as a DataFrame or a 2-d ndarray

  • nlags (int) – number of lags K

  • is_pacf (bool) – return the statsmodels pacf (default) rather than acf

Returns:

the table indexed by lag 0 to nlags, lag 0 included (one), with the columns of paths; its mean across columns, named 'mean'; and its standard deviation across columns with ddof=0, named 'std'

Return type:

(table, mean, std)