QuantConnect
US Equity Security Master
Introduction
The US Equity Security Master dataset by QuantConnect tracks US Equity corporate actions, including splits, dividends, delistings, mergers, and ticker changes through history. The data covers approximately 27,500 US Equities, starts in January 1998, and is delivered on a daily update frequency. You can easily download and install the dataset with the LEAN CLI so it's ready to use by LEAN. LEAN automatically handles all corporate actions and passes them into your algorithm as events.
For more information about the US Equity Security Master dataset, including CLI commands and pricing, see the dataset listing.
About the Provider
QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.
Data Summary
Data is delivered as a daily updated zip archive of map and factor files. The data is designed to be used in the LEAN Engine and cannot be consumed another way. The following table shows the dataset properties:
Property | Value |
---|---|
Start Date | January 1998 |
Data Points | Splits, Dividends, Mergers, IPO, & Delistings |
Asset Coverage | 27,500 US Equities |
Resolution | Daily |
Timezone | New York |
Getting Started
You don't need any special code to utilize the US Equity Security Master. It automatically loads when you request US Equities data.
Example Applications
The US Security Master enables you to accurately design strategies harnessing any core corporate actions. Examples include the following strategies:
- Post-dividend announcement trading strategies.
- Trading on new Equities by monitoring for IPOs.
- Harnessing split announcements for reverse-split announcement momentum.
For more example algorithms, see Examples.
Data Point Attributes
The US Equity Security Master dataset provides Split
, Dividend
, Delisting
, and SymbolChangedEvent
objects.
Split Attributes
When a split or merger occurs, we pass the previous Symbol
data into your algorithm. Split
objects have the following attributes:
Dividend Attributes
Dividend events are triggered on the payment date. Dividend
objects have the following attributes:
Delisting Attributes
When a security is delisted, we notify your algorithm. Delisting
objects have the following attributes:
SymbolChangedEvent Attributes
When a security changes their ticker, we notify your algorithm. SymbolChangedEvent
objects have the following attributes:
Supported Assets
To view the supported assets in the US Equity Security Master dataset, see the Data Explorer. This dataset doesn't include Over-the-Counter (OTC) stocks.
Accessing Splits
To get the current split data, index the splits
property of the current Slice
with the Equity Symbol
. Slice objects deliver unique events to your algorithm as they happen, but the Slice
may not contain data for your security at every time step. To avoid issues, check if the Slice
contains the data you want before you index it.
def on_data(self, slice: Slice) -> None: # Check if any splits for the symbol if slice.splits.contains_key(self._symbol): # If so, get the mapped split object split = slice.splits[self._symbol] split_type = {0: "Warning", 1: "SplitOccurred"}.get(split.type) self.log(f"Split: {split.symbol}\t{split.split_factor}\t{split.reference_price}\t{split_type}")
For more information about accessing splits, see Splits.
Accessing Dividends
To get the current dividend data, index the dividends
property of the current Slice
with the Equity Symbol
. Slice objects deliver unique events to your algorithm as they happen, but the Slice
may not contain data for your security at every time step. To avoid issues, check if the Slice
contains the data you want before you index it.
def on_data(self, slice: Slice) -> None: # Check if any dividend for the symbol if slice.dividends.contains_key(self._symbol): # If so, get the mapped dividend object dividend = slice.dividends[self._symbol] self.log(f'Dividend: {dividend.symbol}\t{dividend.distribution}\t{dividend.reference_price}')
For more information about accessing dividends, see Dividends.
Accessing Delistings
To get the current Delistings data, index the delistings
property of the current Slice
with the Equity Symbol
. Slice objects deliver unique events to your algorithm as they happen, but the Slice
may not contain data for your security at every time step. To avoid issues, check if the Slice
contains the data you want before you index it.
def on_data(self, slice: Slice) -> None: # Check if any delisting for the symbol if slice.delistings.contains_key(self._symbol): # If so, get the mapped delisting object delisting = slice.delistings[self._symbol] delisting_type = {0: "Warning", 1: "Delisted"}.get(delisting.type) self.log(f'Delistings: {delisting_type}')
For more information about accessing delistings, see Delistings.
Accessing Symbol Change Events
To get the current Symbol change events, index the symbol_changed_events
property of the current Slice
with the Equity Symbol
. Slice objects deliver unique events to your algorithm as they happen, but the Slice
may not contain data for your security at every time step. To avoid issues, check if the Slice
contains the data you want before you index it.
def on_data(self, slice: Slice) -> None: # Check if any symbol change event for the symbol if slice.symbol_changed_events.contains_key(self._symbol): # If so, get the mapped SymbolChangeEvent object symbol_changed_event = slice.symbol_changed_events[self._symbol] self.log(f"Symbol changed: {symbol_changed_event.old_symbol} -> {symbol_changed_event.new_symbol}")
For more information about accessing Symbol change events, see Symbol Changes.
Historical Data
To get historical US Equity Security Master data, call the history
method with the data type and the Equity Symbol
. If there is no data in the period you request, the history result is empty.
# Splits split_history_df = self.history(Split, self._symbol, timedelta(5*365)) split_history = self.history[Split](self._symbol, timedelta(5*365)) # Dividends dividend_history_df = self.history(Dividend, self._symbol, timedelta(5*365)) dividend_history = self.history[Dividend](self._symbol, timedelta(5*365)) # Symbol Changes symbol_change_history_df = self.history(SymbolChangedEvent, self._symbol, timedelta(5*365)) symbol_change_history = self.history[SymbolChangedEvent](self._symbol, timedelta(5*365)) # Delistings delisting_history_df = self.history(Delisting, self._symbol, timedelta(5*365)) delisting_history = self.history[Delisting](self._symbol, timedelta(5*365))
For more information about historical data, see History Requests.
Example Applications
The US Security Master enables you to accurately design strategies harnessing any core corporate actions. Examples include the following strategies:
- Post-dividend announcement trading strategies.
- Trading on new Equities by monitoring for IPOs.
- Harnessing split announcements for reverse-split announcement momentum.
For more example algorithms, see Examples.