feat(collectors): BAA10Y full-history credit-regime indicator (Stage 2.5c)#205
Merged
Merged
Conversation
…age 2.5c) Stage 2.5c of the regime-conditioning rebuild (plan doc: alpha-engine-docs/private/regime-conditioning-260510.md). Adds Moody's BAA Corporate Bond Yield Relative to 10Y Treasury (FRED: BAA10Y) alongside HYOAS to provide credit-regime signal across the full predictor training corpus. Why BAA10Y: HYOAS (BAMLH0A0HYM2 / Stage 2.5) is license-gated to 2023-05-09+ on FRED's public API — only ~3y of history available. The predictor's training corpus starts in 2018 and walk-forward validation spans 2018-2025; without a longer-history credit indicator, most folds train without any credit-regime signal. BAA10Y has 40y FRED history (1986-01-02+), daily, percent. BBB-rated spread vs HY's below-BBB — different part of the credit spectrum but both are institutional-canonical regime indicators (AQR, Two Sigma, BlackRock Aladdin factor models include both). What ships: - collectors/fred_history.py FRED_HISTORY_MAP: BAA10Y → BAA10Y added (FRED series ID matches our ticker key) - collectors/daily_closes.py _FRED_INDEX_MAP: BAA10Y added so daily ingestion picks it up alongside the existing TWO + HYOAS - config.yaml.example always_download: BAA10Y added - 2 new tests in test_dgs2_hyoas_ingestion + test_fred_history_fetcher locking the BAA10Y entry; updated existing assertions for the new total counts (7 in _FRED_INDEX_MAP, 3 in FRED_HISTORY_MAP) 674 tests pass + 1 skipped (2 new + 672 existing). Operator follow-up: backfill TWO + HYOAS + BAA10Y to S3 in one shot once this PR merges: python -m collectors.fred_history --bucket alpha-engine-research Then Stage 2c-full ships the predictor-side consumption with macros yield_curve_10y_2y, hy_oas_level, hy_oas_change_21d, baa10y_level, baa10y_change_21d. Co-Authored-By: Claude Opus 4.7 (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.
Summary
BAA10Y) alongside HYOAS to provide credit-regime signal across the full predictor training corpusPlan reference
Plan doc:
~/Development/alpha-engine-docs/private/regime-conditioning-260510.md(gitignored). ROADMAP entry in alpha-engine-config #103.What ships
collectors/fred_history.pyFRED_HISTORY_MAP:BAA10Y → BAA10Y(FRED series ID matches our ticker key)collectors/daily_closes.py_FRED_INDEX_MAP: BAA10Y added so daily ingestion picks it up alongside TWO + HYOASconfig.yaml.examplealways_download: BAA10Y added_FRED_INDEX_MAP, 3 inFRED_HISTORY_MAP)Stage sequencing
python -m collectors.fred_history --bucket alpha-engine-research(one-shot, fetches all 3: TWO + HYOAS + BAA10Y)prod_vol_risk_augGBM (uses feat(features): per-ticker risk features (Stage 2a regime-conditioning rebuild) #202 risk features)Test plan
_FRED_INDEX_MAP, 3 inFRED_HISTORY_MAP)🤖 Generated with Claude Code