Skip to content

Add macro events data pipeline (FOMC, CPI, NFP) - #1

Open
kedar-chintalapati wants to merge 1 commit into
mainfrom
feature/events-data-pipeline
Open

kedar-chintalapati wants to merge 1 commit into
mainfrom
feature/events-data-pipeline

Conversation

@kedar-chintalapati

@kedar-chintalapati kedar-chintalapati commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

##Summary

Adds the full macro events data infrastructure from the "Event Data TODO" in AGENTS.md.
This gives us the event calendars needed for the core thesis — testing whether BS mispricing
is systematic around macro events.

What's new

  • src/data/events/ package — FOMC (57 dates), CPI (84), NFP (84), earnings, unified calendar
  • scripts/collect_events.py — CLI runner with --force, --start, --end, --tickers flags
  • tests/test_events.py — 38 tests, all passing
  • src/data/fetch_events.py — updated to re-export new functions for backwards compat

How to generate the data CSVs (they're gitignored)

After pulling this branch, run:
uv run python scripts/collect_events.py --force

Or use the zip I'll share separately — it has the pre-built CSVs.

TODO items addressed

  • Fed meeting dates (FOMC)
  • CPI release dates
  • Jobs report dates (NFP)
  • earnings_direction feature (was already implemented)
  • Multi-date historical options (separate issue, not events data)

Build modular events package (src/data/events/) with hardcoded
historical calendars for FOMC meetings (57 dates), CPI releases
(84 dates), and NFP/jobs reports (84 dates), covering 2020-2026.

Each module provides date collection + distance helpers (days_to_next,
days_since_last, in_window). Unified module merges all sources and
exposes get_macro_event_features() for the ML feature builder.

Also adds collection runner script, 38 tests (all passing), and
re-exports new functions from fetch_events.py for backwards compat.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant