EOD Historical Data

Upcoming Splits

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.

For more information about the Upcoming Splits dataset, including CLI commands and pricing, see the dataset listing.

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

Getting Started

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

self.add_universe(EODHDUpcomingSplits, self.selection_function)
AddUniverse<EODHDUpcomingSplits>(SelectionFunction);

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJanuary 2010
Data DensitySparse
ResolutionDaily
TimezoneNew York

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.

Data Point Attributes

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

Universe Selection

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

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]
public override void Initialize()
{
    _universe = AddUniverse<EODHDUpcomingSplits>(UniverseSelectionFilter);
}

private IEnumerable<Symol> UniverseSelectionFilter(IEnumerable<EODHDUpcomingSplits> splits)
{
    return from d in splits
           where d.SplitDate <= Time.AddDays(3) && d.SplitFactor > 1m
           select d.Symbol;
}

For more information about universe settings, see Settings.

Requesting Data

To add Upcoming Splits data to your algorithm, call the AddData<EODHDUpcomingSplits>add_data method.

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
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class UpcomingSplitsDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<EODHDUpcomingSplits>("splits").Symbol;
        }
    }
}

Accessing Data

To get the current Upcoming Splits data, call the Get<EODHDUpcomingSplits>get(EODHDUpcomingSplits) method from the current Slice 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.

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}")
public override void OnData(Slice slice)
{
    var upcomingSplits = slice.Get<EODHDUpcomingSplits>();
    if (upcomingSplits.TryGetValue(_symbol, out var upcomingSplitsDataPoint))
    {
        Log($"{_symbol} will split at {upcomingSplitsDataPoint.SplitDate} with split factor {upcomingSplitsDataPoint.SplitFactor}");
    }
}

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

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}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<EODHDUpcomingSplits>())
    {
        var equitySymbol = kvp.Key;
        var upcomingSplitsDataPoint = kvp.Value;
        Log($"{equitySymbol} will splits at {upcomingSplitsDataPoint.SplitDdate} with split factor {upcomingSplitsDataPoint.SplitFactor}");
    }
}

Historical Data

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

history_bars = self.history[EODHDUpcomingSplits](self._symbol, 100, Resolution.DAILY)
var history = History<EODHDUpcomingSplits>(_symbol, 100, Resolution.Daily);

For more information about historical data, see History Requests.

Remove Subscriptions

To remove a subscription, call the RemoveSecurityremove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

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.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: