quantlab.dataset.sharadar.history#
Point-in-time histories of a security’s TICKERS attributes, rebuilt from ACTIONS changes.
TICKERS gives each security’s current attributes only. ACTIONS records a
change of some of them as a pair of rows on one date, <kind>from (the
old value) and <kind>to (the new one): sicchangefrom/sicchangeto
for the SIC code (the code in value), exchangefrom/exchangeto
for the listing exchange (the name in contraname). A history is rebuilt
by walking back from the current value: on a day, a security’s value is the
<kind>from of its first change dated after that day, or the current
value when no change is later. A change dated on a weekend or holiday
therefore shows from the next trading day. Every change in ACTIONS is
walked through, even one dated after the days a panel holds: TICKERS is
pulled whole, so its current value already reflects it. <kind>to is not
read; where it disagrees with the next change’s <kind>from (19 of 2,927
SIC changes on the 2026-10-05 pull) the walk back keeps the value that held
afterwards, the current one.
ACTIONS is keyed by the same current ticker as SEP, so its rows are mapped through SEP’s TICKERS rows; a row of a ticker outside SEP is another security and is dropped. Two changes of one kind of one security on one date are refused.
sic_history is the one SIC history of the package: the point-in-time
industry (quantlab.dataset.sharadar.industry) and the listing panel
(quantlab.dataset.sharadar.listing) both read it, so they never disagree
about a security’s SIC on a day.
Examples#
With config a SharadarIndustryConfig or SharadarListingConfig:
securities = sep_securities(config, "MyPanel", ("siccode",))
spells = sic_history(config, securities, "MyPanel")
spells.columns # ['permaticker', 'start', 'end', 'sic']
Functions
Return each kept security's changes of one kind: |
|
Return each kept SEP security's |
|
Return each kept security's SIC spells, walked back from TICKERS' |
|
Return each security's spells of one attribute, walked back from its current value. |