Add macro events data pipeline (FOMC, CPI, NFP) - #1
Open
kedar-chintalapati wants to merge 1 commit into
Open
kedar-chintalapati wants to merge 1 commit into
kedar-chintalapati wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
##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 calendarscripts/collect_events.py— CLI runner with --force, --start, --end, --tickers flagstests/test_events.py— 38 tests, all passingsrc/data/fetch_events.py— updated to re-export new functions for backwards compatHow 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