quantlab.dataset.sharadar.permatickers.ticker_changes#

quantlab.dataset.sharadar.permatickers.ticker_changes(vendor_root, code)[source]#

Return each permaticker’s ticker changes, (date, old ticker, old company), by date.

A tickerchangefrom row of ACTIONS says that on its date the security trading as contraticker (company contraname) became ticker. If a security changed away from that ticker later (AAX -> BBX -> BBB: the change into BBX), the row is that security’s, the one whose change away from it comes first after the row’s date, even when another company trades under the ticker now. Otherwise the row is the security the TICKERS rows of code (of every table for None) give the ticker to. A row that maps to nothing, or to several permatickers, is left out.

Parameters:
vendor_rootstr or Path

<download-dir>/sharadar, holding TICKERS and ACTIONS.

codestr or None

The table whose TICKERS rows own the tickers ("sep"); None for the rows of every table (funds included).

Returns:
dict

{permaticker: [(date as YYYY-MM-DD, old ticker, old company), ...]}.

Examples

>>> ticker_changes("/data/downloads/sharadar", "sep")[194817]
[('2022-06-09', 'FB', 'FACEBOOK INC')]
>>> ticker_changes("/data/downloads/sharadar", None)[117736]  # a fund (SFP)
[('2026-04-09', 'BJK', None)]