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:
@@ -7,7 +7,12 @@ import pandas as pd
|
|||||||
SP500_URL = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
|
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:
|
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".
|
# IBKR writes share classes with a space: BRK.B -> "BRK B".
|
||||||
return ticker.replace(".", " ")
|
return ticker.replace(".", " ")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user