quantlab.dataset.sharadar.permatickers.related_spans#
- quantlab.dataset.sharadar.permatickers.related_spans(vendor_root, code)[source]#
Return the former tickers TICKERS’
relatedtickersshows, with the security’s price span.relatedtickerslists, space-separated, a security’s former tickers and also its related securities (other share classes, a SPAC’s units, predecessors), most of them other securities’ tickers. Only a token the security’s current ticker is followed by a number (NSTR of NSTR1) counts: TICKERS appends one when it renames a security whose ticker another took over, so the token was this security’s. It is dated from the security’s first to the day after its last price (open-ended without one), as the rename is not dated.- Parameters:
- vendor_rootstr or Path
<download-dir>/sharadar.- codestr
The table whose TICKERS rows are read (
"sep").
- Returns:
- dict
{(former ticker, permaticker): (start, end)}.
Examples
>>> related_spans("/data/downloads/sharadar", "sep")[("NSTR", 173730)] (datetime.date(2006, 5, 8), datetime.date(2009, 7, 21))