Macro release calendar artifact (FRED release dates + FOMC meetings)#368
Merged
Conversation
…+ FOMC) A second dashboard-facing artifact alongside macro_history: forward-looking macro EVENT dates for robodashboard's Calendar/Macro pages. - build_release_calendar(): next FRED release dates for the clean periodic series (CPI, unemployment, initial claims, consumer sentiment) within a 180d horizon, plus every future scheduled 2026 FOMC meeting. Daily series and FEDFUNDS are excluded (daily releases are calendar noise; the fed-funds event is the FOMC meeting). Best-effort per series — a FRED hiccup yields a FOMC-only calendar, not an empty artifact. - write_release_calendar(): overwrites market_data/macro_release_calendar.parquet each run (idempotent); empty build (no FRED key) is a no-op. - Wired into collect() as a guarded secondary write, mirroring macro_history — a calendar failure never masks the macro.json the trading pipeline needs. - Artifact-registry PUT count for collectors/macro.py bumped 2 → 3. FOMC 2026 dates are hardcoded from federalreserve.gov (refresh annually). Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
Adds a second dashboard-facing macro artifact —
market_data/macro_release_calendar.parquet— carrying forward-looking macro event dates for robodashboard's upcoming Calendar page (and a real "next release" date for the Macro page, replacing the cadence estimate in robodashboard#63).Columns:
date, kind ('release'|'fomc'), series_id, label, release_name.How
build_release_calendar(api_key, today)— for the clean periodic FRED series (CPI, Unemployment, Initial Claims, Consumer Sentiment), resolves each series' FRED release (/fred/series/release) and pulls upcoming scheduled dates (/fred/release/dateswithinclude_release_dates_with_no_data=true), kept within a 180-day horizon. Plus every future scheduled 2026 FOMC meeting (hardcoded decision-day dates from federalreserve.gov).kind=fomc).write_release_calendar()— overwrites the fixed key each run (idempotent); empty build (no FRED key) is a no-op, never clobbering a good artifact.collect()as a guarded secondary write, mirroringmacro_history— a calendar failure is logged + returned in the status dict and never masks themacro.jsonthe trading pipeline depends on (no-silent-fails: recorded surface = WARN log +release_calendarstatus field).collectors/macro.pybumped 2 → 3.Companion
feat/macro-release-calendar-registry(severity=warning, weekly Saturday).Tests
tests/test_release_calendar.py: build shape + kinds, future-only + 180d horizon filtering, FOMC future-only, sorted, FOMC-only-when-FRED-down, empty-without-key, write-puts-parquet, write-skips-empty.pytest tests/ -vis the CI gate (no ruff in this repo).Follow-ups
write_release_calendar(bucket="alpha-engine-research")on the box / locally with creds — same asmacro_historywas seeded.🤖 Generated with Claude Code