Skip to main content

The PyTimeVar package offers state-of-the-art estimation and statistical inference methods for time series regression models with flexible trends and/or time- varying coefficients.

Project description

PyTimeVar: A Python Package for Trending Time-Varying Time Series Models

License: GPL v3 PyPI PyPI - Downloads

Authors: Mingxuan Song (m3.song@student.vu.nl, Vrije Universiteit Amsterdam), Bernhard van der Sluis (vandersluis@ese.eur.nl, Erasmus Universiteit Rotterdam), and Yicong Lin (yc.lin@vu.nl, Vrije Universiteit Amsterdam & Tinbergen Institute)

Purpose of the package

The PyTimeVar package offers state-of-the-art estimation and statistical inference methods for time series regression models with flexible trends and/or time-varying coefficients. The package implements nonparametric estimation along with multiple recently proposed bootstrap-assisted inference methods. Pointwise confidence intervals and simultaneous bands of parameter curves via bootstrap can be easily obtained using user-friendly commands. The package also includes four commonly used methods for modeling trends and time-varying relationships: boosted Hodrick-Prescot filter, power-law trend models, state-space models, and score-driven models. This allows users to compare different approaches within a unified environment.

The package is built upon several papers and books. We list the key references below.

Local linear kernel estimation and bootstrap inference

Friedrich and Lin (2024) (doi: https://doi.org/10.1016/j.jeconom.2022.09.004); Lin et al. (2024) (doi: https://doi.org/10.1080/10618600.2024.2403705); Friedrich et al. (2020) (doi: https://doi.org/10.1016/j.jeconom.2019.05.006); Smeekes and Urbain (2014) (doi: https://doi.org/10.26481/umagsb.2014008) Zhou and Wu (2010) (doi: https://doi.org/10.1111/j.1467-9868.2010.00743.x); Bühlmann (1998) (doi: https://doi.org/10.1214/aos/1030563978);

Boosted HP filter

Mei et al. (2024) (doi: doi: https://doi.org/10.1002/jae.3086); Biswas et al. (2024) (doi: https://doi.org/10.1080/07474938.2024.2380704); Phillips and Shi (2021) (doi: https://doi.org/10.1111/iere.12495);

Power-law trend models

Lin and Reuvers (2024) (https://tinbergen.nl/discussion-paper/6214/22-092-iii-cointegrating-polynomial-regressions-with-power-law-trends-environmental-kuznets-curve-or-omitted-time-effects); Robinson (2012) (doi: https://doi.org/10.3150/10-BEJ349);

State-space models

Durbin and Koopman (2012) (doi: https://doi.org/10.1093/acprof:oso/9780199641178.001.0001)

Score-drive models

Creal et al. (2013) (doi: https://doi.org/10.1002/jae.1279); Harvey (2013) (doi: https://doi.org/10.1017/CBO9781139540933);

Features

  • Nonparametric estimation of time-varying time series models, along with various bootstrap-assisted methods for inference, including local blockwise wild bootstrap, wild bootstrap, sieve bootstrap, sieve wild bootstrap, autoregressive wild bootstrap
  • Alternative estimation methods for modeling trend and time-varying relationships, including boosted HP filter, power-law trend models, state-space, and score-driven models.
  • Unified framework for comparison of methods.
  • Multiple datasets for illustration.

Getting started

The PyTimeVar can implemented as a PyPI package. To download the package in your Python environment, use the following command:

pip install PyTimeVar

Support

The documentation of the package can be found at the GitHub repository https://github.com/bpvand/PyTimeVar, and ReadTheDocs https://pytimevar.readthedocs.io/en/latest/.

For any questions or feedback regarding the PyTimeVar package, please feel free to contact the authors via email: m3.song@student.vu.nl; vandersluis@ese.eur.nl; yc.lin@vu.nl.

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

pytimevar-0.0.12.tar.gz (229.8 kB view details)

Uploaded Source

Built Distribution

PyTimeVar-0.0.12-py3-none-any.whl (232.6 kB view details)

Uploaded Python 3

File details

Details for the file pytimevar-0.0.12.tar.gz.

File metadata

  • Download URL: pytimevar-0.0.12.tar.gz
  • Upload date:
  • Size: 229.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for pytimevar-0.0.12.tar.gz
Algorithm Hash digest
SHA256 63f6be905babf3ad308a002b4a7454b2c711aa321b76c8e7dafe591b47a6a6b3
MD5 78959f517d4989d985f6ea89a92f32d6
BLAKE2b-256 05761999aad283344aa2f56e5d058cc94a4462de1def3d27d5a9ea3950f4f219

See more details on using hashes here.

File details

Details for the file PyTimeVar-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: PyTimeVar-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 232.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for PyTimeVar-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 99644b01aec47ae828227b78f21526b35d392922d2bb951302af66eeb4b0486b
MD5 6e540f4ed71d9b539ae45b5405cf6c5a
BLAKE2b-256 b4671d88537d7f70e0b897e762e228cbb2f23c56ff70bd1ed6c14f682a5ba7e3

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