mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 04:31:13 +00:00
fix(fred): drop the 5-year TIPS maturity that FRED no longer publishes (#7757)
* fix(fred): TIPS yields raise EmptyDataError when nothing is published 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> * fix(fred): drop the 5-year TIPS maturity choice 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> --------- Co-authored-by: artcashin <artinnj@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: dlee-bq <dlee@brightquery.com>
This commit is contained in:
@@ -28,11 +28,11 @@ SERIES_PERCENT_COLUMN: dict[str, Any] = {
|
||||
class FredTipsYieldsQueryParams(UseCacheQueryParams, TipsYieldsQueryParams):
|
||||
"""FRED TIPS Yields Query."""
|
||||
|
||||
maturity: Literal["5", "10", "20", "30"] | None = Field(
|
||||
maturity: Literal["10", "20", "30"] | None = Field(
|
||||
default=None,
|
||||
description="The maturity of the security in years - 5, 10, 20, 30 - defaults to all."
|
||||
description="The maturity of the security in years - 10, 20, 30 - defaults to all."
|
||||
+ " Note that the maturity is the tenor of the security, not the time to maturity.",
|
||||
json_schema_extra={"choices": ["5", "10", "20", "30"]},
|
||||
json_schema_extra={"choices": ["10", "20", "30"]},
|
||||
)
|
||||
frequency: (
|
||||
Literal[
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -364,7 +364,7 @@ class TestFredFixedIncomeFetchers:
|
||||
params = {
|
||||
"start_date": datetime.date(2024, 7, 17),
|
||||
"end_date": datetime.date(2024, 7, 17),
|
||||
"maturity": "5",
|
||||
"maturity": "10",
|
||||
}
|
||||
|
||||
fetcher = FredTipsYieldsFetcher()
|
||||
|
||||
Reference in New Issue
Block a user