Map Wikipedia's PSKY to IBKR's SKYD

Paramount Skydance moved its listing to NYSE as SKYD; Wikipedia still
lists the old NASDAQ ticker PSKY, which IBKR cannot qualify.
This commit is contained in:
2026-10-05 23:38:10 -07:00
parent 76d5e44186
commit eaa77ef187

View File

@@ -7,7 +7,12 @@ import pandas as pd
SP500_URL = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
# Tickers Wikipedia lists differently from what IBKR carries.
IBKR_SYMBOL_OVERRIDES = {"PSKY": "SKYD"} # Paramount Skydance trades as SKYD/NYSE on IBKR
def to_ib_symbol(ticker: str) -> str:
ticker = IBKR_SYMBOL_OVERRIDES.get(ticker, ticker)
# IBKR writes share classes with a space: BRK.B -> "BRK B".
return ticker.replace(".", " ")