Skip to main content

Decomposing ML Forecast Gains in Macroeconomic Forecasting

Project description

macrocast

Decomposing ML Forecast Gains in Macroeconomic Forecasting.

An open-source Python (+ R) framework for systematic evaluation of machine learning methods in macroeconomic forecasting, with built-in support for the FRED-MD, FRED-QD, and FRED-SD database ecosystem.

CI Docs PyPI License: MIT


Release Status

Surface State
Latest PyPI release Pending first nfer-macrocast publish
Current repository version 0.1.0
PyPI-safe scope today Data layer and package metadata cleanup
Repo-head, not yet published Forecasting pipeline, evaluation layer, macrocastR companion work

The repository is ahead of the current PyPI release. Install from source if you need unreleased pipeline or evaluation features. The PyPI distribution name is nfer-macrocast. The Python import package remains macrocast.


Installation

pip install nfer-macrocast
# or with all extras
pip install nfer-macrocast[all]

Quick Start

import macrocast as mc

# Load and transform FRED-MD (latest vintage, cached locally)
md = mc.load_fred_md()
md_t = md.transform()

print(md_t)
# MacroFrame(dataset='FRED-MD', vintage='current', T=790, N=128,
#            period=1959-01-01 to 2024-10-01, status=transformed)

# Subset by variable group
output = md_t.group("output_income")   # INDPRO, RPI, ...
prices = md_t.group("prices")          # CPI, PPI, ...

# Check missing values
report = md.missing_report()
print(report[["n_leading", "n_trailing", "n_intermittent"]].head())

# Method chaining
md_ready = (
    mc.load_fred_md()
    .trim(start="1970-01", end="2023-12")
    .handle_missing("trim_start")
    .transform()
)

# Load a specific vintage
md_2020 = mc.load_fred_md(vintage="2020-01")

# FRED-QD (quarterly)
qd = mc.load_fred_qd()

# FRED-SD (state-level)
sd = mc.load_fred_sd(states=["CA", "TX"], variables=["UR"])

Documentation

Full documentation is available at nanyeonk.github.io/macrocast.

R Package Status

macrocastR remains source-only and is not CRAN-ready yet.

  • man/ pages and a full roxygen regeneration/review step are still pending.
  • The R CI workflow currently runs R CMD check in a non-failing mode because documentation artifacts are incomplete.
  • Registry publishing and credentialed release work should happen after those packaging gaps are closed.

License

MIT

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

nfer_macrocast-0.1.0.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

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

nfer_macrocast-0.1.0-py3-none-any.whl (89.3 kB view details)

Uploaded Python 3

File details

Details for the file nfer_macrocast-0.1.0.tar.gz.

File metadata

  • Download URL: nfer_macrocast-0.1.0.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nfer_macrocast-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97f237f57bb65669b1fde30eede47b915ce67399288ba799aec1341fa15567f5
MD5 6a7ece692fd13aca60053d0610dfad66
BLAKE2b-256 a6ec23eaf3bc0ea0006e6bbd4ee89f20da3598b9a7c5937b65d349c57145281d

See more details on using hashes here.

File details

Details for the file nfer_macrocast-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nfer_macrocast-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 89.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nfer_macrocast-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a2ee71c240a984f50c69956860f364ae1fadecfe63e551504e96e4c720d9770
MD5 56a1ab96d6e3c2be9f819c5f7364d7f2
BLAKE2b-256 b8b366d426ac041acd30cbbc80d4a695a0da49adf9f49911b9d32fddd82ce418

See more details on using hashes here.

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