Skip to content

fix(yfinance): normalize class-share symbols before Yahoo requests#7536

Open
gyx09212214-prog wants to merge 1 commit into
OpenBB-finance:developfrom
gyx09212214-prog:codex/yfinance-class-share-symbols
Open

fix(yfinance): normalize class-share symbols before Yahoo requests#7536
gyx09212214-prog wants to merge 1 commit into
OpenBB-finance:developfrom
gyx09212214-prog:codex/yfinance-class-share-symbols

Conversation

@gyx09212214-prog

Copy link
Copy Markdown

Summary

  • Add yfinance-only class-share symbol normalization for common US class-share symbols such as BRK.A and BF.B, converting them to Yahoo's dash-form symbols at the request boundary.
  • Apply the helper to yf_download(...) and yfinance Ticker(...)-based equity/fundamental request paths while preserving the requested dot-form symbol in OpenBB symbol output fields.
  • Add mocked coverage for helper boundaries, yf.download ticker arguments, multi-symbol historical output, and a quote fetcher Ticker("BRK-A") path.

Why

Users can use OpenBB's dot convention from #6702 while Yahoo still receives the dash-form symbols it expects. This keeps the mapping vendor-specific and avoids changing global symbol semantics.

Scope

  • Only openbb-yfinance is changed.
  • No standard model changes.
  • No global symbol policy changes.
  • No non-yfinance provider changes.
  • The conversion is deliberately conservative for this first step, covering common class suffixes A, B, and C so one-letter Yahoo exchange suffixes such as VOD.L remain unchanged.

Validation

From openbb_platform/providers/yfinance:

  • python -m pytest tests/test_yfinance_helpers.py -q - 19 passed
  • python -m ruff check openbb_yfinance tests/test_yfinance_helpers.py - passed

Refs #6702

@gyx09212214-prog gyx09212214-prog force-pushed the codex/yfinance-class-share-symbols branch 2 times, most recently from ed79d63 to 0bdcc22 Compare June 15, 2026 15:53
@gyx09212214-prog gyx09212214-prog force-pushed the codex/yfinance-class-share-symbols branch from 0bdcc22 to b0b4027 Compare June 15, 2026 15:54
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