---
title: "Upcoming Splits"
description: "Upcoming Splits dataset from EOD Historical Data."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/eod-historical-data/upcoming-splits
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/eod-historical-data/upcoming-splits.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/14%20Datasets/12%20EOD%20Historical%20Data/06%20Upcoming%20Splits
modified: 2026-11-01
index: https://www.quantconnect.com/llms.txt
---

# Upcoming Splits

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Datasets > [EOD Historical Data](https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/eod-historical-data.md) > Upcoming Splits

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

## Introduction

The Upcoming Splits dataset, provided by EODHD, offers daily alerts for US Equities that will have a split event within the upcoming 7 days. The data starts in January 2010, and is delivered on a daily frequency.

Compared to [US Equity Security Master](https://www.quantconnect.com/datasets/quantconnect-us-equity-security-master) as a benchmark, the Upcoming Splits dataset has an 85.18% coverage of all splits since 2015, while having a 92.74% precision on the exact split dates of the covered ones and a 97.18% precision within +/- 3 days.

For more information about the Upcoming Splits dataset, including CLI commands and pricing, see the [dataset listing](https://www.quantconnect.com/datasets/eodhd-upcoming-splits).

## About the Provider

EOD Historical Data (EODHD) is a financial data provider based in France, and founded in April 2015. They focus on providing clean financial data, including stock prices, splits, dividends, fundamentals, macroeconomic indicators, technical indicators, and alternative data sources, through 24/7 API seamlessly. For more information about EODHD, visit [https://eodhd.com/](https://eodhd.com/).

## Getting Started

The following snippet demonstrates how to request data from the Upcoming Splits dataset:

```python
self.add_universe(EODHDUpcomingSplits, self.selection_function)
```

## Data Summary

The following table describes the dataset properties:

| Property | Value |
| --- | --- |
| Start Date | January 2010 |
| Data Density | Sparse |
| Resolution | Daily |
| Timezone | New York |

## Requesting Data

To add Upcoming Splits data to your algorithm, call the `add_data` method.

```python
class UpcomingSplitsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self._symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(EODHDUpcomingSplits, "splits").symbol
```

## Accessing Data

To get the current Upcoming Splits data, call the `get(EODHDUpcomingSplits)` method from the current [`Slice`](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md) and index the result with the security `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:
    upcomings_splits = slice.get(EODHDUpcomingSplits)
    if upcomings_splits and self._symbol in upcomings_splits:
        upcomings_splits_data_point = upcomings_splits[self._symbol]
        self.log(f"{self._symbol} will split at {upcomings_splits_data_point.split_date} with split factor {upcomings_splits_data_point.split_factor}")
```

You can also iterate through all of the dataset objects in the current `Slice`

```python
def on_data(self, slice: Slice) -> None:
    for equity_symbol, upcomings_splits_data_point in slice.get(EODHDUpcomingSplits).items():
        self.log(f"{equity_symbol} will split at {upcomings_splits_data_point.split_date} with split factor {upcomings_splits_data_point.split_factor}")
```

## Historical Data

To get historical Upcoming Splits data, call the `history` method with the type `EODHDUpcomingSplits` cast and the period of request. If there is no data in the period you request, the history result is empty.

```python
history = self.history[EODHDUpcomingSplits](timedelta(100), Resolution.DAILY)
```

For more information about historical data, see [History Requests](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md).

## Universe Selection

To select a dynamic universe of US Equities based on the Upcoming Splits dataset, call the `add_universe` method with a `EODHDUpcomingSplits` cast.

```python
def initialize(self) -> None:
    self._universe = self.add_universe(EODHDUpcomingSplits, self.universe_selection_filter)

def universe_selection_filter(self, splits: List[EODHDUpcomingSplits]) -> List[Symbol]:
    return [d.symbol for d in splits if d.split_date <= self.time + timedelta(3) and d.split_factor > 1]
```

For more information about universe settings, see [Settings](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/settings.md).

## Universe History

You can get historical universe data in an algorithm and in the Research Environment.

### Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the `history` method with the `Universe` object and the lookback period. If there is no data in the period you request, the history result is empty.

```python
# DataFrame example where the columns are the EODHDUpcomingSplits attributes:
history_df = self.history(self._universe, 30, Resolution.DAILY, flatten=True)

# Series example where the values are lists of EODHDUpcomingSplits objects:
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), splits in universe_history.items():
    for split in splits:
        self.log(f"{split.symbol} split factor on {split.split_factor}: {split.split_factor}")
```

### Historical Universe Data in Research

To get historical universe data in research, call the `history` method with the `Universe` object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

```python
# DataFrame example where the columns are the EODHDUpcomingSplits attributes:
history = qb.history(universe, qb.time-timedelta(30), qb.time, flatten=True)
```

## Remove Subscriptions

To remove a subscription, call the `remove_security` method.

```python
self.remove_security(self.dataset_symbol)
```

## Example Applications

The Upcoming Splits dataset provides timely notifications about upcoming share split or reverse split events, allowing traders to capitalize on potential price movements and manage risks effectively. Examples include the following strategies:

- Splits into shares with lower price will provide higher liquidity for market making algorithms.
- Select a universe of stocks with upcoming splits event and trade their volatility using options.
- Buy stocks with split factor higher than 1, sell vice versa for self-defeating ones.

### Classic Algorithm Example

The following example algorithm holds each equity in equal size with upcoming splits within 7 days. It selects stocks that split up to more shares with lower price and tries to capitalize the higher demand of the more afforable stocks.

```python
from AlgorithmImports import *

class UpcomingSplitsExampleAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)
        # Seed the price of each asset with its last known price to avoid trading errors.
        self.settings.seed_initial_prices = True
        # Select equities with upcoming split events.
        self._universe = self.add_universe(EODHDUpcomingSplits, self.selection)
        # Add a Scheduled Event to rebalance the portfolio every morning based on upcoming split signals.
        spy = Symbol.create('SPY', SecurityType.EQUITY, Market.USA)
        self.schedule.on(
            self.date_rules.every_day(spy),
            self.time_rules.after_market_open(spy, 1),
            self._rebalance
        )

    def selection(self, splits: List[EODHDUpcomingSplits]) -> List[Symbol]:
        # Select splits that increase share count and make each share more affordable.
        return [x.symbol for x in splits if x.split_factor > 1]

    def _rebalance(self) -> None:
        # Equally invest in each member of the universe to evenly dissipate the capital risk.
        symbols = [s for s in self._universe.selected if self.securities[s].price]
        total_count = len(symbols)
        targets = [PortfolioTarget(symbol, 1. / total_count) for symbol in symbols]
        self.set_holdings(targets, True)
```

### Framework Algorithm Example

The following example algorithm holds each equity in equal size with upcoming splits within 7 days using algorithm framework. It selects stocks that split up to more shares with lower price and tries to capitalize the higher demand of the more afforable stocks.

```python
class UpcomingSplitsExampleAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)
        self.settings.free_portfolio_value_percentage = 0.1

        # Trade on daily basis based on daily upcoming splits signals.
        self.universe_settings.resolution = Resolution.DAILY
        # Universe consists of equities with upcoming splits events.
        self.add_universe(EODHDUpcomingSplits, self.selection)

        # Constant alpha model to emit insights for the stocks with split up event within a week, estimating their demand and price will go up.
        # Signal stays for 2 days to fully digest the driven up demands.
        self.add_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(2)))

        # Equal weighting for each signal to evenly dissipate the capital risk.
        self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel(Expiry.END_OF_DAY))

    def selection(self, splits: List[EODHDUpcomingSplits]) -> List[Symbol]:
        # Split (more shares with lower price) will make the stock more affordable and drive up the demand.
        # Hence, include the stocks with the lowest split factor that will have a split within the next 7 days.
        # Note that spliting up the stock means the split factor > 1.
        count = 5
        splits = [x for x in splits if x.split_factor > 1]
        if len(splits) > count:
            splits = sorted([x for x in splits if x.split_factor > 1], key=lambda x: x.split_factor)[:count]
        return [x.symbol for x in splits]
```

## Data Point Attributes

The EODHD Upcoming Splits dataset provides `EODHDUpcomingSplits` objects, which have the following attributes:

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