quantlab.universe.USEquityUniverseFetcher#

class quantlab.universe.USEquityUniverseFetcher[source]#

Bases: TiingoRosterFetcher

Roster of US common stock listed on NYSE, NASDAQ and AMEX, priced in USD.

Delisted names are included. AMEX appears in Tiingo’s directory under both AMEX and NYSE MKT, because historical rows were never relabelled when the exchange was renamed, so both tokens are kept; NYSE ARCA, NYSE NAT and BATS are different exchanges and are excluded. Several hundred tickers carry more than one exchange row, which is why the catalog’s interval queries de-duplicate on symbol.

This roster opts into EXCLUDE_NON_COMMON_SECURITY_TYPES, so preferred shares and baby bonds are dropped while hyphenated class shares such as BRK-B, and warrants, units and rights, are kept. It is therefore not a strict superset of NasdaqUniverseFetcher’s roster: a NASDAQ-listed preferred share appears there and not here, by design.

Examples

>>> roster = USEquityUniverseFetcher().fetch()  # downloads from Tiingo
>>> roster.columns
['symbol', 'start_date', 'end_date']
CATEGORY = 'us_all'#

The catalog category this roster is stored under. Typed as the literal so an unknown token is a type error rather than a runtime surprise.

EXCHANGE_FILTER = ('NASDAQ', 'NYSE', 'AMEX', 'NYSE MKT')#

Exact exchange tokens kept by fetch.

EXCLUDE_NON_COMMON_SECURITY_TYPES = True#

When true, fetch also drops preferred shares and baby bonds (see _PREFERRED_SHARE_PATTERN and _BABY_BOND_PATTERN). Off by default so a roster’s contents never change unless its subclass opts in.

MIN_ROSTER_ROWS = 8000#

Minimum row count fetch accepts; fewer rows means the vendor’s token vocabulary drifted and the roster is refused.