Pandas-first macro forecasting workflow package
Project description
macroforecast
macroforecast is being rebuilt as a pandas-first macro forecasting workflow
package. The current public surface is intentionally small:
macroforecast.meta: package-wide defaults such as random seed and worker count.macroforecast.data: canonical date-indexed panels, metadata, FRED/custom loaders, and study data specs.macroforecast.preprocessing: direct pandas preprocessing callables.macroforecast.data_summary: one-panel summary tables.macroforecast.data_analysis: before/after preprocessing analysis.macroforecast.metrics: scoring metrics and forecast-table ranking.macroforecast.tests: forecast-comparison tests and diagnostics.macroforecast.evaluation: namespace wrapper formetricsandtests.
The old YAML/runtime implementation is no longer part of the clean importable
package. A reference copy is preserved on the legacy-runtime-reference branch.
Install
pip install -e ".[dev]"
Torch is not installed by default in this rebuild.
Quick Use
import macroforecast as mf
mf.configure(random_seed=42, n_jobs=1)
bundle = mf.data.load_custom_csv(
"panel.csv",
date="date",
dataset="my_panel",
frequency="monthly",
)
data_spec = mf.data.spec(
bundle,
target="INDPRO",
horizons=[1, 3, 6],
start="1990-01-01",
end="2024-12-01",
)
processed = mf.preprocessing.reprocess(
data_spec,
transform="custom",
transform_codes={"INDPRO": 5},
outliers="iqr",
impute="em_factor",
)
summary = mf.data_analysis.summarize_data(processed.panel)
analysis = mf.data_analysis.analyze_data(bundle.panel, processed.panel)
Data Shape
The standard panel is a pandas.DataFrame with:
- a
DatetimeIndexnameddate - one macro series per column
- numeric values in the cells
- dataset metadata stored separately and mirrored in
panel.attrs["macroforecast_metadata"]
macroforecast.data.load_*() returns a DataBundle(panel, metadata).
macroforecast.data.spec(...) attaches target, horizon, sample-window, and
predictor choices to that panel.
Documentation
Function-level documentation lives under docs/reference/.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macroforecast-0.9.5.tar.gz.
File metadata
- Download URL: macroforecast-0.9.5.tar.gz
- Upload date:
- Size: 535.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10b2eebd0243e201f209c828152e20699b56b86f7be2484817e6028eaeb1c3ee
|
|
| MD5 |
ee0eaa46c7d33ee04ff439db85f75ccc
|
|
| BLAKE2b-256 |
ed92996381997ef52f4c10567678aa708eafbb18f3a6de86481bb320095fca79
|
File details
Details for the file macroforecast-0.9.5-py3-none-any.whl.
File metadata
- Download URL: macroforecast-0.9.5-py3-none-any.whl
- Upload date:
- Size: 576.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64805ed469c7673012823e9440ce520b6181aa54b499131eb9e90315161cad3b
|
|
| MD5 |
f7fc070453c61258d5aad6157e1ca1dc
|
|
| BLAKE2b-256 |
60d2a6eaa040c4c387e5811ae9e7b45a58c25f137caae2a3b0f41685079be753
|