Metadata-Version: 2.1
Name: tsdisagg
Version: 1.3
Summary: Statistical tools for converting low frequency time series data to higher frequencies
Author-email: Jesse Grabowski <jessegrabowski@gmail.com>
License: MIT License
        
        Copyright (c) 2022 jessegrabowski
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/jessegrabowski/tsdisagg.git
Project-URL: Issues, https://github.com/jessegrabowski/tsdisagg/issues
Keywords: time series,decomposition,datetime,econometrics
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas>=2.2.0
Requires-Dist: scipy
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: versioneer; extra == "dev"

# 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](https://journal.r-project.org/archive/2013-2/sax-steiner.pdf).

`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
To install, use
`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
For example usage, please see the `examples.ipynb` notebook. `tsdisagg` depends heavily on `pandas` to handle time reindexing, so the user is advised to read the associated Pandas documentation, especially as it relates to setting frequencies.


## To-do:
1. Refactor codebase to use `statsmodels` model and results objects, as well as `.fit()` api
2. Add missing interpolation methods relative to `timedisagg` (Fernandez, min RSS objective functions)
3. Add support for finer time frequencies (weekly, daily, hourly)
