OpenBB-finance / OpenBB

Investment Research for Everyone, Everywhere.
https://openbb.co
Other
31.83k stars 2.91k forks source link

[Feature] Add Fred Release Tables #6595

Closed deeleeramone closed 2 months ago

deeleeramone commented 2 months ago
  1. Why?:

    • This feature adds a function similar to obb.economy.fred_series, but for the economic release tables.
    • Generic endpoint that returns relational table data for a specific release and date(s).
    • This function also serves as a discovery mechanism for individual FRED Series IDs that would otherwise be difficult to curate.
  2. What?:

    • New route: obb.economy.fred_release_table()
    • Required parameter is release_id.
      • Found via obb.economy.fred_search(), or from the FRED/Federal Reserve websites.
    • element_id is the specific table from the release.
      • When not supplied the top-level sections/tables are returned with IDs that can be used for drill-down.0
    • Release and Element IDs are entered as strings, despite being numeric.
    • Frequency selection is not possible via this method, however release tables are often structured where each frequency (annual, quarterly) and parameter (seasonally adjusted, etc.) are a separate table (element_id) within the release_id.
    • Each release is looked up by date, multiple dates are allowed. No date retrieves the latest observations.
  3. Impact:

    • Standard model that will likely have no use for other providers.

    • Improves the self-directed access to the vast amounts of data available from FRED.

    • Functions that curate release tables can recycle the Fetcher for specific uses.

  4. Testing Done:

    • Unit/Integration tests.
    • Variety of releases on different frequency schedules.
    • Multiple dates, single dates, no dates.

Screenshot 2024-07-19 at 8 41 50 PM

Screenshot 2024-07-19 at 8 44 15 PM