Skip to content

feat(collectors): BAA10Y full-history credit-regime indicator (Stage 2.5c)#205

Merged
cipher813 merged 1 commit into
mainfrom
feat/baa10y-credit-spread-stage-2-5c
May 10, 2026
Merged

feat(collectors): BAA10Y full-history credit-regime indicator (Stage 2.5c)#205
cipher813 merged 1 commit into
mainfrom
feat/baa10y-credit-spread-stage-2-5c

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

  • 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
  • HYOAS (PR feat(daily_closes): TWO + HYOAS forward-only daily ingestion (Stage 2.5) #203) is license-gated to 2023-05-09+ on FRED — only ~3y available. The predictor's walk-forward training spans 2018-2025; most folds had no credit-regime signal
  • BAA10Y has 40 years of FRED history (1986-01-02+), daily, percent
  • BBB-rated spread vs HY's below-BBB — different part of the credit spectrum, both are institutional-canonical regime indicators (AQR, Two Sigma, BlackRock Aladdin factor models include both)

Plan 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.py FRED_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 + HYOAS
  • config.yaml.example always_download: BAA10Y added
  • 2 new tests + updated existing assertions for the new total counts (7 in _FRED_INDEX_MAP, 3 in FRED_HISTORY_MAP)

Stage sequencing

  • Stage 0 → 2.5b (data + predictor stages 0-2.5b shipped)
  • Stage 2.5c (this PR)
  • Operator backfill — python -m collectors.fred_history --bucket alpha-engine-research (one-shot, fetches all 3: TWO + HYOAS + BAA10Y)
  • Stage 2c-full — predictor consumption (yield_curve_10y_2y, hy_oas_level, hy_oas_change_21d, baa10y_level, baa10y_change_21d)
  • Stage 2b — predictor parallel prod_vol_risk_aug GBM (uses feat(features): per-ticker risk features (Stage 2a regime-conditioning rebuild) #202 risk features)

Test plan

  • 2 new tests for BAA10Y entries in both maps
  • Updated total-count locks (7 in _FRED_INDEX_MAP, 3 in FRED_HISTORY_MAP)
  • Existing tests still pass — 674 passed + 1 skipped

🤖 Generated with Claude Code

…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>
@cipher813 cipher813 merged commit 69634bb into main May 10, 2026
1 check passed
@cipher813 cipher813 deleted the feat/baa10y-credit-spread-stage-2-5c branch May 10, 2026 18:27
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