fix(universe): robust iShares→yfinance ticker mapping for class shares
- Filter to Asset Class == Equity only (removes UBFUT, XTSLA non-equity rows) - Static remap for 16 known iShares compact tickers → canonical yfinance hyphenated form (BRKB→BRK-B, BFA→BF-A, HEIA→HEI-A, LENB→LEN-B, UHALB→UHAL-B, CWENA→CWEN-A, etc.) - Avoids false positives: META, NVDA, TSLA, ABNB, ZBRA, CMCSA preserved correctly - Fix C401 in ohlcv_cache.py (set comprehension) - Result: 1003 clean equity tickers from Russell 1000 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0cee7b0161
commit
43cc7eb623
|
|
@ -51,7 +51,7 @@ PERIOD_TO_DAYS: Dict[str, Optional[int]] = {
|
|||
|
||||
def _cache_key(tickers: List[str]) -> str:
|
||||
"""Stable 12-char hash of the (sorted, uppercase) ticker set."""
|
||||
canonical = ",".join(sorted(set(t.upper() for t in tickers)))
|
||||
canonical = ",".join(sorted({t.upper() for t in tickers}))
|
||||
return hashlib.md5(canonical.encode()).hexdigest()[:12]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue