---
title: "US Equity Security Master"
description: "US Equity Security Master dataset from QuantConnect."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect/us-equity-security-master
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect/us-equity-security-master.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/14%20Datasets/02%20QuantConnect/23%20US%20Equity%20Security%20Master
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# US Equity Security Master

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Datasets > [QuantConnect](https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect.md) > US Equity Security Master

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## 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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions.md).

This is `NOT` the underlying Equity data ([US Equities](https://www.quantconnect.com/datasets/algoseek-us-equities) dataset), which you need to purchase separately with a license from AlgoSeek. This security master dataset is required to purchase the US Equities or US Equities Options datasets.

For more information about the US Equity Security Master dataset, including CLI commands and pricing, see the [dataset listing](https://www.quantconnect.com/datasets/quantconnect-us-equity-security-master).

## 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 |

This is `not` the underlying Equity data ([US Equities](https://www.quantconnect.com/datasets/algoseek-us-equities') dataset), which you need to purchase separately with a license from AlgoSeek. This security master dataset is required to purchase the US Equities or US Equities Options datasets.

## 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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/requesting-data.md).

## Accessing Splits

To get the current split data, index the `splits` property of the current [`Slice`](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md) 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.

```python
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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions.md#02-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.

```python
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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions.md#03-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.

```python
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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions.md#05-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.

```python
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](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions.md#04-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.

```python
# 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](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md).

## Live Trading Considerations

In backtesting, corporate actions occurs at midnight (ET). In live trading, the live data for corporate actions arrives at 6/7 AM ET, so that's when they occur.

## Supported Assets

To view the supported assets in the US Equity Security Master dataset, see the [Data Explorer](https://www.quantconnect.com/datasets/algoseek-us-equities/explorer). This dataset doesn't include Over-the-Counter (OTC) stocks.

## 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.

### Classic Algorithm Example

The following example algorithm logs the `Split`, `Dividend`, `Delisting`, and `SymbolChangedEvent` objects of Apple:

```python
from AlgorithmImports import *

class USEquitySecurityMasterAlgorithm (QCAlgorithm):

    def initialize(self):
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(1000000)

        self.equity = self.add_equity("AAPL", Resolution.DAILY).symbol

    def on_data(self, slice: Slice) -> None:
        # Accessing Data - Splits
        split = slice.splits.get(self.equity)
        if split:
            self.debug(f"{self.time} >> SPLIT >> {split.symbol} - {split.split_factor} - {self.portfolio.cash} - {self.portfolio[self.equity].price}")

        # Accessing Data - Dividends
        dividend = slice.dividends.get(self.equity)
        if dividend:
            self.debug(f"{self.time} >> DIVIDEND >> {dividend.symbol} - {dividend.distribution} - {self.portfolio.cash} - {self.portfolio[self.equity].price}")

        # Accessing Data - Delisting
        delisting = slice.delistings.get(self.equity)
        if delisting:
            delisting_type = {0: "Warning", 1: "Delisted"}.get(delisting.type)
            self.debug(f"{self.time} >> DELISTING >> {delisting.symbol} - {delisting_type}")

        # Accessing Data - Symbol Changed Event
        symbol_changed_event = slice.symbol_changed_events.get(self.equity)
        if symbol_changed_event:
            self.debug(f"{self.time} >> SYMBOL CHANGED >> {symbol_changed_event.old_symbol} -> {symbol_changed_event.new_symbol}")
```

### Framework Algorithm Example

The following algorithm demonstrates the payments for cash dividends in backtesting. When the data normalization mode is `Raw`, your portfolio receives cash dividends.

```python
from AlgorithmImports import *

class PaymentAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)

        # this will use the Tradier Brokerage open order split behavior
        # forward split will modify open order to maintain order value
        # reverse split open orders will be canceled
        self.set_brokerage_model(BrokerageName.TRADIER_BROKERAGE)

        self.universe_settings.resolution = Resolution.DAILY
        self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW

        # MSFT: Splits and Dividends
        # GOOG: Symbol Changed Event
        # AAA.1: Delisting

        self.set_universe_selection(ManualUniverseSelectionModel(
            Symbol.create("MSFT", SecurityType.EQUITY, Market.USA)))

        self.set_alpha(PaymentAlphaModel())
        self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())
        self.set_execution(BracketExecutionModel())

class PaymentAlphaModel(AlphaModel):

    symbol = Symbol.EMPTY

    def update(self, algorithm: QCAlgorithm, slice: Slice) -> List[Insight]:
        # Accessing Data - Splits
        split = slice.splits.get(self.symbol)
        if split:
            algorithm.debug(f"{algorithm.time} >> SPLIT >> {split.symbol} - {split.split_factor} - {algorithm.portfolio.cash} - {algorithm.portfolio[self.symbol].price}")

        # Accessing Data - Dividends
        dividend = slice.dividends.get(self.symbol)
        if dividend:
            algorithm.debug(f"{algorithm.time} >> DIVIDEND >> {dividend.symbol} - {dividend.distribution} - {algorithm.portfolio.cash} - {algorithm.portfolio[self.symbol].price}")

        # Accessing Data - Delistings
        delisting = slice.delistings.get(self.symbol)
        if delisting:
            delisting_type = {0: "Warning", 1: "Delisted"}.get(delisting.type)
            algorithm.debug(f"{algorithm.time} >> DELISTING >> {delisting.symbol} - {delisting_type}")

        # Accessing Data - Symbol Changed Events
        symbol_changed_event = slice.symbol_changed_events.get(self.symbol)
        if symbol_changed_event:
            algorithm.debug(f"{algorithm.time} >> SYMBOL CHANGED >> {symbol_changed_event.old_symbol} -> {symbol_changed_event.new_symbol}")

        bar = slice.bars.get(self.symbol)
        return [Insight.price(self.symbol, timedelta(1), InsightDirection.UP)] if bar else []

    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        self.symbol = list(changes.added_securities)[0].symbol

class BracketExecutionModel(ExecutionModel):

    def __init__(self) -> None:
        '''Initializes a new instance of the ImmediateExecutionModel class'''
        self.targets_collection = PortfolioTargetCollection()

    def execute(self, algorithm: QCAlgorithm, targets: List[PortfolioTarget]) -> None:

        # for performance we check count value, OrderByMarginImpact and ClearFulfilled are expensive to call
        self.targets_collection.add_range(targets)
        if self.targets_collection.count > 0:
            for target in self.targets_collection.order_by_margin_impact(algorithm):
                # calculate remaining quantity to be ordered
                quantity = OrderSizing.get_unordered_quantity(algorithm, target)
                if quantity != 0 and algorithm.transactions.orders_count == 0:
                    bar = algorithm.securities[target.symbol].get_last_data()
                    algorithm.market_order(target.symbol, quantity)
                    # place some orders that won't fill, when the split comes in they'll get modified to reflect the split
                    algorithm.stop_market_order(target.symbol, -quantity, bar.low/2)
                    algorithm.limit_order(target.symbol, -quantity, bar.high*2)

            self.targets_collection.clear_fulfilled(algorithm)
```

## 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:

*Members of `QuantConnect.Data.Market.Split` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.Split&language=python*

### Dividend Attributes

Dividend events are triggered on the payment date. `Dividend` objects have the following attributes:

*Members of `QuantConnect.Data.Market.Dividend` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.Dividend&language=python*

### Delisting Attributes

When a security is delisted, we notify your algorithm. `Delisting` objects have the following attributes:

*Members of `QuantConnect.Data.Market.Delisting` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.Delisting&language=python*

### SymbolChangedEvent Attributes

When a security changes their ticker, we notify your algorithm. `SymbolChangedEvent` objects have the following attributes:

*Members of `QuantConnect.Data.Market.SymbolChangedEvent` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.SymbolChangedEvent&language=python*
