Skip to main content

A suite of statistical tests for time-series data.

Project description

Time Series Statistical Tests

ts-stat-tests

PyPI version Released Python OS
Build Tests MyPy Tests Unit Tests codecov
Deploy Docs Publish Package CodeQL
License Downloads Code Style
Contributions

Motivation

Time Series Analysis has been around for a long time, especially for doing Statistical Testing. Some Python packages are going a long way to make this even easier than it has ever been before. Such as sktime and pycaret and pmdarima and statsmodels.

There are some typical Statistical Tests which are accessible in these Python (QS, Normality, Stability, etc). However, there are still some statistical tests which are not yet ported over to Python, but which have been written in R and are quite stable.

Moreover, there is no one single library package for doing time-series statistical tests in Python.

That's exactly what this package aims to achieve.

A single package for doing all the standard time-series statistical tests.

Tests

Full credit goes to the packages listed in this table.

Type Name Source Package Source Language Implemented
Correlation Auto-Correlation function (ACF) statsmodels Python
Correlation Partial Auto-Correlation function (PACF) statsmodels Python
Correlation Cross-Correlation function (CCF) statsmodels Python
Correlation Ljung-Box test of autocorrelation in residuals (LB) statsmodels Python
Correlation Lagrange Multiplier tests for autocorrelation (LM) statsmodels Python
Correlation Breusch-Godfrey Lagrange Multiplier tests for residual autocorrelation (BGLM) statsmodels Python
Regularity Approximate Entropy antropy python 🔲
Regularity Sample Entropy antropy python 🔲
Regularity Permutation Entropy antropy python 🔲
Regularity Spectral Entropy antropy python 🔲
Seasonality QS seastests R 🔲
Seasonality Osborn-Chui-Smith-Birchenhall test of seasonality (OCSB) pmdarima Python 🔲
Seasonality Canova-Hansen test for seasonal differences (CH) pmdarima Python 🔲
Seasonality Seasonal Strength tsfeatures Python 🔲
Seasonality Trend Strength tsfeatures Python 🔲
Seasonality Spikiness tsfeatures Python 🔲
Stability Stability tsfeatures Python 🔲
Stability Lumpiness tsfeatures Python 🔲
Stationarity Augmented Dickey-Fuller test for stationarity (ADF) statsmodels Python 🔲
Stationarity Kwiatkowski-Phillips-Schmidt-Shin test for stationarity (KPSS) statsmodels Python 🔲
Stationarity Range unit-root test for stationarity (RUR) statsmodels Python 🔲
Stationarity Zivot-Andrews structural-break unit-root test (ZA) statsmodels Python 🔲
Stationarity Phillips-Peron test for stationarity (PP) pmdarima Python 🔲
Stationarity Elliott-Rothenberg-Stock (ERS) de-trended Dickey-Fuller test arch Python 🔲
Stationarity Variance Ratio (VR) test for a random walk arch Python 🔲
Normality Jarque-Bera test of normality (JB) statsmodels Python 🔲
Normality Omnibus test for normality (OB) statsmodels Python 🔲
Normality Shapiro-Wilk test for normality (SW) scipy Python 🔲
Normality D'Agostino & Pearson's test for normality scipy Python 🔲
Normality Anderson-Darling test for normality scipy Python 🔲
Linearity Harvey Collier test for linearity (HC) statsmodels Python 🔲
Linearity Lagrange Multiplier test for linearity (LM) statsmodels Python 🔲
Linearity Rainbow test for linearity (RB) statsmodels Python 🔲
Linearity Ramsey's RESET test for neglected nonlinearity (RR) statsmodels Python 🔲
Heteroscedasticity Engle's Test for Autoregressive Conditional Heteroscedasticity (ARCH) statsmodels Python 🔲
Heteroscedasticity Breusch-Pagan Lagrange Multiplier test for heteroscedasticity (BPL) statsmodels Python 🔲
Heteroscedasticity Goldfeld-Quandt test for homoskedasticity (GQ) statsmodels Python 🔲
Heteroscedasticity White's Lagrange Multiplier Test for Heteroscedasticity (WLM) statsmodels Python 🔲

Known limitations

  • These listed tests is not exhaustive, and there is probably some more that could be added. Therefore, we encourage you to raise issues or pull requests to add more statistical tests to this suite.
  • This package does not re-invent any of these tests. It merely calls the underlying packages, and calls the functions which are already written elsewhere.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ts_stat_tests-0.2.0.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ts_stat_tests-0.2.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file ts_stat_tests-0.2.0.tar.gz.

File metadata

  • Download URL: ts_stat_tests-0.2.0.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ts_stat_tests-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cc8e56086b68360ff1e7a83b6020a60538414f2e762d0c23fc74a74f5cd9b58e
MD5 4055192f6068e78208a0805fec9d02e6
BLAKE2b-256 1ea1f5e2b329a7e46f09fe0848e3f42eb56d66fe41728d29d01fd6ee35126fa7

See more details on using hashes here.

File details

Details for the file ts_stat_tests-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ts_stat_tests-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ts_stat_tests-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f0e5f23123a946e4e6870a841db610842ca347fb1005cbf7408b83849005853
MD5 628268f64c09e76ac6e1c89ce5993482
BLAKE2b-256 6e27472ca79f6d97d9f5f3dfa4d6a51c5c443020a1a06c5c05f5df50867ecafc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page