Skip to main content

Test and Convert non-stationary time-series to stationary

Project description

StationarityToolkit

The StationarityToolkit is a Python class designed to help you analyze and prepare time series data for stationarity. It offers a set of powerful tools for dealing with both trend and variance non-stationarity in your time series data. Below, we'll describe its key features and how to use them:

Features:

1. Test for Variance Non-Stationarity

  • Use the Phillips-Perron test to assess variance non-stationarity in your time series data.

2. Test for Trend Non-Stationarity

  • Employ the Augmented Dickey-Fuller (ADF) and Kwiatkowski-Phillips-Schmidt-Shin (KPSS) tests to identify trend non-stationarity.

3. Remove Trend Non-Stationarity

  • Choose from various methods to eliminate trend non-stationarity, including trend differencing, seasonal differencing, or a combination of both.

4. Remove Variance Non-Stationarity

  • Apply data transformations such as logarithm, square, or Box-Cox to address variance non-stationarity.

5. Remove Both Trend and Variance Non-Stationarity

  • Combine the trend and variance non-stationarity removal techniques to make your time series data stationary.

How to Use:

  1. Import the StationarityToolkit:

    • Import the StationarityToolkit class in your Python script or Jupyter Notebook.
    from StationarityToolkit import StationarityToolkit
    
  2. Initialize the Toolkit:

  • Begin by creating an instance of the StationarityToolkit class, passing your time series data as an argument.

    from StationarityToolkit import StationarityToolkit
    
    # Replace `your_time_series_data` with your actual time series data
    toolkit = StationarityToolkit(alpha)
    
  1. Test for Stationarity:
  • Utilize the toolkit's methods to assess stationarity in your time series data. The toolkit offers the following testing options:

    toolkit.perform_pp_test()  # Phillips-Perron Test for variance non-stationarity
    toolkit.adf_test()              # Test for trend non-stationarity using ADF
    toolkit.kpss_test()             # Test for trend non-stationarity using KPSS
    

These steps will help you get started with the StationarityToolkit and analyze your time series data for stationarity.

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

stationarityToolkit-0.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

stationarityToolkit-0.0.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file stationarityToolkit-0.0.0.tar.gz.

File metadata

  • Download URL: stationarityToolkit-0.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for stationarityToolkit-0.0.0.tar.gz
Algorithm Hash digest
SHA256 330f46245920eb7deadd4e107527fb10561598f44079768da2ad5d0482c44205
MD5 6164c3b718aace1f89d661a35468a4c6
BLAKE2b-256 ebbe95ac6f2b573be678e547803cb8297651a7e0f30a57b1cb926bd2b0c86cd8

See more details on using hashes here.

File details

Details for the file stationarityToolkit-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stationarityToolkit-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25e349dd59e83724982b536503218f04f7a523528c41a45d23a2b46041e86190
MD5 4b82b302decda2b77a30d1129e9cc67f
BLAKE2b-256 cd975b8cb5aefbb9e2b34a88491362477bdf3e588457256d75ba5248de6992ca

See more details on using hashes here.

Supported by

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