Skip to main content

Python bindings for JDemetra+ seasonal adjustment and time series analysis

Project description

pydemetra

Python front-end to JDemetra+, which is a Java package for seasonal adjustment.

⚠️ This repo is under development and not fully tested. Use with caution ⚠️

Want to just get going? Head to the Quick Start page.

This project has no affiliation the original JDemetra+, but we're grateful to its creators!

Functionality

pydemetra was inspired by the rjdverse R front-end to JDemetra+. Without that package, this one would not be possible. Not all of the functionality of either JDemetra+ or the R front-end is implemented in this package.

Implemented

  • X-13ARIMA-SEATS seasonal adjustment (X-13, X-11, RegARIMA)
  • TRAMO-SEATS seasonal adjustment (TRAMO, SEATS)
  • Calendars and trading days — national calendars, fixed/Easter/weekday holidays, trading day regressors
  • ARIMA modelling — SARIMA, UCARIMA, estimation, decomposition, simulation
  • Regression variables — outliers (AO, LS, TC, SO), ramps, interventions, Easter/leap-year effects, periodic dummies, trigonometric variables
  • Statistical tests — seasonality, normality, trading days, autocorrelation
  • Time series utilities — aggregation, interpolation, differencing, length-of-period adjustment
  • Distributions — t, chi-squared, gamma, inverse gamma, inverse Gaussian
  • Splines — B-splines, natural/monotonic/periodic cubic splines
  • Benchmarking specification

Not implemented

  • STL decomposition
  • State space models
  • High-frequency seasonal adjustment
  • Extended X-11
  • Benchmarking and temporal disaggregation
  • Revision analysis
  • Trend-cycle filters

Prerequisites

  • Python 3.11+
  • Java 17+ (the JVM is started automatically on first use)

Most functions that interact with JDemetra+ Java classes require a running JVM. The JVM is started lazily on the first call — no manual setup needed as long as Java 17+ is on your PATH or JAVA_HOME is set.

Installing Java on MacOS

To install a recent version of Java, run

brew install openjdk
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"

and then restart your terminal.

Development

  1. git clone repo
  2. branch
  3. install with development requirements using uv sync
  4. do the work you need to
  5. uv run nox for full test suite; everything should pass

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

pydemetra-0.1.1.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

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

pydemetra-0.1.1-py3-none-any.whl (7.1 MB view details)

Uploaded Python 3

File details

Details for the file pydemetra-0.1.1.tar.gz.

File metadata

  • Download URL: pydemetra-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydemetra-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4bfce067efd607366d944a265c38bfef556b8c9920a679ed164d10a67057e996
MD5 f640712e990dcfa5a71ad3e670ace0bd
BLAKE2b-256 a2cd55f791a10d0b758598c6a001fc2d708315e57218cfd672c9add46e03195a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydemetra-0.1.1.tar.gz:

Publisher: release.yml on aeturrell/pydemetra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pydemetra-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pydemetra-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydemetra-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e5b787ab269e76eee632ef70fe270858e425eb2ef558dfca8e6be38aec8dfcff
MD5 61a8a60f2d91c3fba4bd8a936da50888
BLAKE2b-256 b37d098c2fac2749fff732efb2da0017fcc85c0ac72ff1e222eebcdf6fff87f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydemetra-0.1.1-py3-none-any.whl:

Publisher: release.yml on aeturrell/pydemetra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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