EOD Historical Data
Upcoming IPOs
Introduction
The Upcoming IPOs dataset, provided by EODHD, offers daily alerts for US Equities that will start their IPOs or have any updates on their IPO registrations within the upcoming 7 days. The data started in February 2013 and is delivered on a daily basis.
Notice that this dataset might have a +/-2 days accuracy due to the data provider.
For more information about the Upcoming IPOs dataset, including CLI commands and pricing, see the dataset listing.
Example Applications
The Upcoming IPOs dataset provides timely notifications about upcoming IPOs start, allowing traders to capitalize on the high volatility of new stocks. Examples include the following strategies:
- Long straddle to trade the volatility of the new IPO stock.
- Arbitration on fair price versus IPO price.
- Use SMA of IPO number to estimate the IPO trend and market popularity.
Universe Selection
To select a dynamic universe of US Equities based on the Upcoming IPOs dataset, call the AddUniverse
add_universe
method with a EODHDUpcomingIPOs
cast.
def initialize(self) -> None: self.universe_settings.asynchronous = True self._universe = self.add_universe(EODHDUpcomingIPOs, self.universe_selection_filter) def universe_selection_filter(self, ipos: List[EODHDUpcomingIPOs]) -> List[Symbol]: # confirmed non-penny stock IPO that launches within 7 days. return [d.symbol for d in ipos if d.deal_type in [DealType.EXPECTED, DealType.PRICED] and d.ipo_date and min(x for x in [d.lowest_price, d.highest_price, d.offer_price] if x) > 1]
private static readonly List<DealType> _dealTypesWanted = new { DealType.Expected, DealType.Priced }; public override void Initialize() { UniverseSettings.Asynchronous = True; _universe = AddUniverse<EODHDUpcomingIPOs>(UniverseSelectionFilter); } private IEnumerable<Symol> UniverseSelectionFilter(IEnumerable<EODHDUpcomingIPOs> ipos) { // confirmed non-penny stock IPO that launches within 7 days. return from d in ipos where _dealTypesWanted.Contains(d.DealType) && d.IpoDate.HasValue && new[] { d.LowestPrice, d.HighestPrice, d.OfferPrice }.Where(x => x.HasValue).Min().Value > 1 select d.Symbol; }
For more information about universe settings, see Settings.
Requesting Data
To add Upcoming IPOs data to your algorithm, call the AddData<EODHDUpcomingIPOs>
add_data
method.
class UpcomingIPOsDataAlgorithm(QCAlgorithm): def initialize(self) -> None: self.set_start_date(2019, 1, 1) self.set_end_date(2020, 6, 1) self.set_cash(100000) self.dataset_symbol = self.add_data(EODHDUpcomingIPOs, "ipos").symbol
namespace QuantConnect.Algorithm.CSharp.AltData { public class UpcomingIPOsDataAlgorithm : QCAlgorithm { private Symbol _datasetSymbol; public override void Initialize() { SetStartDate(2019, 1, 1); SetEndDate(2020, 6, 1); SetCash(100000); _datasetSymbol = AddData<EODHDUpcomingIPOs>("ipos").Symbol; } } }
Accessing Data
To get the current Upcoming IPOs data, call the Get<EODHDUpcomingIPOs>
get(EODHDUpcomingIPOs)
method from the current Slice
. Then, iterate through all of the dataset objects in the current Slice
def on_data(self, slice: Slice) -> None: for equity_symbol, upcomings_ipos_data_point in slice.get(EODHDUpcomingIPOs).items(): self.log(f"{equity_symbol} will start IPO at {upcomings_ipos_data_point.ipo_date} with price {upcomings_ipos_data_point.offer_price} and {upcomings_ipos_data_point.shares} shares")
public override void OnData(Slice slice) { foreach (var kvp in slice.Get<EODHDUpcomingIPOs>()) { var equitySymbol = kvp.Key; var upcomingIPOsDataPoint = kvp.Value; Log($"{equitySymbol} will start IPO at {upcomingIPOsDataPoint.IPODate} with price {upcomingIPOsDataPoint.OfferPrice} and {upcomingIPOsDataPoint.Shares} shares"); } }
Historical Data
To get historical Upcoming IPOs data, call the History
history
method with the type EODHDUpcomingIPOs
cast and the period of request. If there is no data in the period you request, the history result is empty.
history_bars = self.history[EODHDUpcomingIPOs](timedelta(100), Resolution.DAILY)
var history = History<EODHDUpcomingSplits>(TimeSpan.FromDays(100), Resolution.Daily);
For more information about historical data, see History Requests.
Example Applications
The Upcoming IPOs dataset provides timely notifications about upcoming IPOs start, allowing traders to capitalize on the high volatility of new stocks. Examples include the following strategies:
- Long straddle to trade the volatility of the new IPO stock.
- Arbitration on fair price versus IPO price.
- Use SMA of IPO number to estimate the IPO trend and market popularity.