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

# Upcoming IPOs

[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 IPOs

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

## 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](https://www.quantconnect.com/datasets/eodhd-upcoming-ipos).

## About the Provider

EODHD was a France financial data provider founded in April 2015. They focus on providing clean financial data, including stock prices, splits, dividends, fundamentals, macroeconomy indicators, technical indicators, and alternative data sources, through 24/7 API seamlessly.

## Getting Started

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

```python
self.add_data(EODHDUpcomingIPOs, "ipos")
self.add_universe(EODHDUpcomingIPOs, self.selection_function)
```

## Data Summary

The following table describes the dataset properties:

| Property | Value |
| --- | --- |
| Start Date | February 2013 |
| Data Density | Sparse |
| Resolution | Daily |
| Timezone | New York |

## Requesting Data

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

```python
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
```

## Accessing Data

To get the current Upcoming IPOs data, call the `get(EODHDUpcomingIPOs)` method from the current [`Slice`](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md). Then, iterate through all of the dataset objects in the current `Slice`

```python
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")
```

## Historical Data

To get historical Upcoming IPOs data, call the `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.

```python
history_bars = self.history[EODHDUpcomingIPOs](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 IPOs dataset, call the `add_universe` method with a `EODHDUpcomingIPOs` cast.

```python
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]
```

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 EODHDUpcomingIPOs attributes:
history_df = self.history(self._universe, 30, Resolution.DAILY, flatten=True)

# Series example where the values are lists of EODHDUpcomingIPOs objects:
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), ipos in universe_history.items():
    for ipo in ipos:
        self.log(f"{ipo.symbol} offer price at {ipo.ipo_date}: {ipo.offer_price}")
```

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

### Classic Algorithm Example

### Example 1: New Stock

The following example algorithm holds new stocks for its IPO day to capitalize its hype.

```python
from AlgorithmImports import *

class UpcomingIPOsExampleAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)
        # Filter for new stocks with EODHDUpcomingIPOs to trade first-day hype.
        self._universe = self.add_universe(EODHDUpcomingIPOs, self.selection)

    def selection(self, ipos: List[EODHDUpcomingIPOs]) -> List[Symbol]:
        # Select stocks with IPO dates by tomorrow on Nasdaq.
        return [
            x.symbol for x in ipos
            if (x.ipo_date and
                x.ipo_date <= self.time + timedelta(1) and
                x.exchange == Exchange.NASDAQ)
        ]

    def on_data(self, data: Slice) -> None:
        # Invest in new stocks to trade first-day hype.
        # Equally invest in each new stock to distribute capital risk.
        for symbol in self._universe.selected:
            security = self.securities[symbol]
            if not security.holdings.invested and security.price:
                self.set_holdings(symbol, 0.1 / len(self._universe.selected))

    def on_securities_changed(self, changes: SecurityChanges) -> None:
        # Liquidate new stocks traded today or yesterday to capitalize on first-day hype.
        for security in changes.removed_securities:
            self.liquidate(security)
```

### Example 2: Market Popularity

The following example algorithm buy QQQ if the number of IPO in Nasdaq is in increasing trend, sell otherwise.

```python
from AlgorithmImports import *

class UpcomingIPOsExampleAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)
        # Create a EMA indicator to estimate the trend of IPO number to reflect the market popularity.
        self._ema = ExponentialMovingAverage(50)

        self.universe_settings.resolution = Resolution.DAILY
        # Filter for new stocks to trade their hype using EODHDUpcomingIPOs.
        self.add_universe(EODHDUpcomingIPOs, self.selection)
        # Request QQQ data to trade.
        self.qqq = self.add_equity("QQQ", Resolution.DAILY).symbol

        self.set_warm_up(50, Resolution.DAILY)

    def selection(self, ipos: List[EODHDUpcomingIPOs]) -> List[Symbol]:
        # Filter for the stocks that IPO starts today and traded in Nasdaq.
        universe = [x.symbol for x in ipos if x.ipo_date and x.ipo_date <= self.time + timedelta(1) and x.exchange == Exchange.NASDAQ]
        # Feed to the EMA indicator.
        self._ema.update(self.time, len(universe))
        return Universe.UNCHANGED

    def on_data(self, slice: Slice) -> None:
        if not self.is_warming_up and self._ema.is_ready:
            # If the EMA is decreasing, we estimate the market popularity is decreasing, so we sell QQQ.
            if self._ema.previous.value > self._ema.current.value:
                self.set_holdings(self.qqq, -1)
            # Otherwise, we estimate the market popularity is increasing, so we buy QQQ.
            else:
                self.set_holdings(self.qqq, 1)
```

### Framework Algorithm Example

The following example algorithm holds new stocks for its IPO day to capitalize its hype using framework algorithm.

```python
from AlgorithmImports import *

class UpcomingIPOsExampleAlgorithm(QCAlgorithm):

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

        # Filter for new stocks to trade their hype using EODHDUpcomingIPOs.
        self.add_universe(EODHDUpcomingIPOs, self.selection)

        # Invest in new stocks and trade on their first day for their hype.
        self.add_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(1), None, None, 0.01))

        # Equally invest in each new stocks to evenly dissipate the capital risk.
        self.set_portfolio_construction(InsightWeightingPortfolioConstructionModel(Expiry.END_OF_DAY))

    def selection(self, ipos: List[EODHDUpcomingIPOs]) -> List[Symbol]:
        # Select the stocks that IPO starts today and traded in Nasdaq
        return [
            x.symbol for x in ipos
            if (x.ipo_date and
                x.ipo_date <= self.time + timedelta(1) and
                x.exchange == Exchange.NASDAQ)
        ]
```

## Data Point Attributes

The EODHD Upcoming IPOs dataset provides `EODHDUpcomingIPOs` objects, which have the following attributes:

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