Skip to content

fix(fred): drop the 5-year TIPS maturity that FRED no longer publishes - #7757

Open
artcashin wants to merge 4 commits into
openbq-org:developfrom
artcashin:fix/fred-tips-yields-empty
Open

artcashin wants to merge 4 commits into
openbq-org:developfrom
artcashin:fix/fred-tips-yields-empty

Conversation

@artcashin

@artcashin artcashin commented Oct 9, 2026 •

Copy link
Copy Markdown

Problem

fixedincome.government.tips_yields (provider fred) offered maturity=5. FRED no longer publishes a live 5-year TIPS: every 5-year series in release 72 is marked DISCONTINUED and filtered out. So that choice always sent an empty symbol list to the series fetcher and failed with KeyError: 'date'.

Change

  • Remove "5" from the maturity choices. The remaining choices are 10, 20 and 30.
  • No other logic changes. The empty-result guards from the first version of this PR were dropped, per review.

Tests

  • test_fred_tips_yields_fetcher now requests the 10-year maturity. Its cassette was re-recorded against FRED, with the API key filtered to MOCK_API_KEY.
  • The FRED suite passes: 1,315 passed and 1 skipped, the same as develop.

🤖 Generated with Claude Code

When the maturity filter left no series, the fetcher asked FRED for an
empty symbol list, and when no observations came back, melt(id_vars="date")
raised KeyError: 'date' (500). FRED publishes no live 5-year TIPS (every
5-year series in release 72 is marked DISCONTINUED and filtered out), so
maturity=5 always hit this. Both cases now raise EmptyDataError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dlee-bq

dlee-bq commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Hi @artcashin, thanks for the PR. The correct solution here is to remove the choice that is no longer valid and not have any workaround logic.

Address review: FRED no longer publishes a live 5-year TIPS (every 5-year series in release 72 is discontinued), so remove the choice instead of guarding the empty result it produced. The recorded fetcher test now asks for the 10-year maturity, re-recorded against FRED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@artcashin artcashin changed the title fix(fred): TIPS yields raise EmptyDataError when nothing is published fix(fred): drop the 5-year TIPS maturity that FRED no longer publishes Oct 12, 2026
@artcashin

Copy link
Copy Markdown
Author

Thanks, done in a9dac40. The "5" choice is gone and so is the workaround logic: the net change is now just the Literal and choices, plus the re-recorded 10-year fetcher test. I've also updated the title and description. The FRED suite passes 1,315 tests with 1 skipped, the same as develop.

This branch has not been deployed

No deployments
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.

2 participants