Skip to main content

tsdisagg

Tools for converting low time series data to high frequency, based on the R package tempdisagg, and espeically the accompanying paper by Sax and Steiner 2013.

tsdisagg allows the user to convert low frequency time series data (e.g., yearly or quarterly) to a higher frequency (e.g., quarterly or monthly) in a way that preserves desired aggregate statistics in the high frequency data. It should, for example, sum back to the original low-frequency data.

In addition, regression-based methods are also implemented that allow the user to supply "indicator series", allowing variation from correlated high-frequency time series to be imputed into the low frequency data.

If you have any questions or issues, please open a thread. Pull requests to add features or fix bugs are welcome. Please clone the repository locally to have access to the testing suite.

Installation

tsdisagg is distributed on conda-forge. To install, use conda/mamba:

conda install -c conda-forge tsdisagg

Or, of course, you can install using pip:

pip install tsdisagg

Current Features

Currently, only conversion between yearly, quarterly, and monthly data is supported. Conversion to lower frequencies is non-trivial due to the calendar math that needs to be added, but this is on my to-do list.

The following interpolation methods have been implemented:

Single series, non-parametric methods:

  • Denton
  • Denton-Cholette

Multiseries, regression-based methods:

  • Chow-Lin
  • Litterman

Examples

Disaggregate a timeseries using the univariate Denton-Cholette method:

import pandas as pd
from tsdisagg import disaggregate_series
from tsdisagg.datasets import load_data

# Load example data
sales_a = load_data("annual_sales")


# Disaggregate from annual to quarterly using Denton-Cholette method
sales_q_dc = disaggregate_series(
    sales_a.resample("YS").last(), # Use `.resample` to ensure the frequency is set correctly
    target_freq="QS", # Desired output frequency
    method="denton-cholette", # Disaggregation method
    agg_func="sum", # Sales are flow data, so we want the quarters to sum back to the annual data
    h=1, # Differencing order (1 in this case to preserve the trend)
)

Disaggregate a timeseries using the multivariate Chow-Lin method with an indicator series:

import pandas as pd
from tsdisagg import disaggregate_series
from tsdisagg.datasets import load_data

# Load example data
sales_a = load_data("annual_sales")
exports_q = load_data("quarterly_exports")

# Disaggregate from annual to quarterly using Chow-Lin method with quarterly sales as indicator
sales_q_chow_lin = disaggregate_series(
    sales_a.resample("YS").last(), # Target series, annual frequency
    exports_q.assign(intercept=1), # Indicator matrix. We can have as many series as we want here; so we use
                                   # Exports at quarterly frequency, plus a deterministic intercept term.
    method="chow-lin", # Disaggregation method
    agg_func="sum", # Sales are flow data, so we want the quarters to sum back to the annual data
    optimizer_kwargs={"method": "powell"}, # Additional arguments to the optimizer
)

Citing tsdisagg

If you use tsdisagg in your research, please use the following citation:

@software{tsdisagg,
author = {Jesse Grabowski},
title = {tsdisagg: Temporal Disaggregation of Time Series Data in Python},
version = {0.1.0},
url = {https://github.com/jessegrabowski/tsdisagg},
howpublished = {GitHub},
year = {2025},
}

Metadata

Release files for tsdisagg 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tsdisagg 1.3.2
File Size Uploaded Provenance Actions
tsdisagg-1.3.2.tar.gz 104.2 kB With provenance Details for tsdisagg-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tsdisagg 1.3.2
File Interpreter ABI Platform Actions
tsdisagg-1.3.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for tsdisagg-1.3.2-py2.py3-none-any.whl

Total release size: 118.1 kB

Release files / tsdisagg-1.3.2.tar.gz

Download URL tsdisagg-1.3.2.tar.gz
Size 104.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2a3a4ffe16f06122e8a5e36dca851b1b03bd5dca1f9f5998111cde5f1061328d
BLAKE2b-256 checksum
How to use checksums
775f75a0bd21a87ccec5eddd598b5d3d3e3885389d3f513a351b78a5f478be7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2025.

Transparency log

Release files / tsdisagg-1.3.2-py2.py3-none-any.whl

Download URL tsdisagg-1.3.2-py2.py3-none-any.whl
Size 13.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7858bf0557d96d4277d737d81f6b197711868f93a20c6d58a91d06b6703ae90d
BLAKE2b-256 checksum
How to use checksums
11de4d28615db3296668aa4d3623dec39785163ab9f5c9d8ca7d63e62c4c02c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2025.

Transparency log

Security for tsdisagg 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tsdisagg-1.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page