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

# US Equity Coarse Universe

[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 Coarse Universe

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

## Introduction

The US Equity Coarse Universe dataset by QuantConnect is a daily universe of all trading stocks in the US for a given day with the end of day price and volume. The data covers 30,000 US Equities in total, with approximately 8,000 Equities per day. The data starts in January 1998 and is delivered each trading day. This dataset is created by taking the closing auction price tick from the daily L1 trade and quote exchange dumps.

This dataset depends on the [US Equities by AlgoSeek](https://www.quantconnect.com/datasets/algoseek-us-equities) dataset because [universe selection](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/key-concepts.md#02-How-Universe-Selection-Works) adds and removes market data subscriptions and on the [US Equity Security Master](https://www.quantconnect.com/datasets/quantconnect-us-equity-security-master) dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

QuantConnect/LEAN combines the data of this dataset with [MorningStar Fundamental data](https://www.quantconnect.com/datasets/morning-star-us-fundamentals) in runtime. You can use this dataset in local development without the Morningstar counterpart.

For more information about the US Equity Coarse Universe dataset, including CLI commands and pricing, see the [dataset listing](https://www.quantconnect.com/datasets/quantconnect-us-coarse-universe-constituents).

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

## Getting Started

The following snippet demonstrates how to request data from the US Equity Coarse Universe dataset:

- Direct Access using the Security object

```python
equity = self.add_equity("IBM")
ibm_fundamental = equity.fundamentals
```

- Direct Access using the Symbol object

```python
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals
```

- Universe Selection

```python
def initialize(self) -> None:
    # Universe selection
    self._universe = self.add_universe(self.fundamental_filter_function)

def fundamental_filter_function(self, fundamental: List[Fundamental]):
    # Sort all equities with price above $10 by dollar volume
    sorted_by_dollar_volume = sorted([f for f in fundamental if f.price > 10],
                                key=lambda f: f.dollar_volume, reverse=True)
    # Take the top 10
    return [f.symbol for f in sorted_by_dollar_volume[:10]]
```

## Data Summary

The following table describes the dataset properties:

| Property | Value |
| --- | --- |
| Start Date | January 1998 |
| Asset Coverage | 30,000 US Equities |
| Data Density | Dense |
| Resolution | Daily |
| Timezone | New York |

This dataset doesn't include Over-the-Counter (OTC) stocks.

## Requesting Data

You don't need any special code to request US Coarse Fundamental Data. You can access the current and historical fundamental data for any of the US Equities that this dataset includes.

```python
class CoarseFundamentalDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 7, 1)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True

        # Option 1: Subscribe to individual US Equity assets
        self.add_equity("IBM")

        # Option 2A: Create a fundamental universe (classic version)
        self._universe = self.add_universe(self.fundamental_function)

        # Option 2B: Create a fundamental universe (framework version)
        self.add_universe_selection(FundamentalUniverseSelectionModel(self.fundamental_function))
```

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

## Accessing Data

If you add a [fundamental universe](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/equity/fundamental-universes.md) to your algorithm, you can access fundamental data in the universe selection function.

```python
def fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    sorted_by_dollar_volume = sorted(fundamental, key=lambda x: x.dollar_volume, reverse=True)[:3]
    for cf in sorted_by_dollar_volume:
        self.debug(f"{cf.end_time} :: {cf.symbol} : {cf.adjusted_price} :: {cf.dollar_volume}")

    return [ x.symbol for x in sorted_by_dollar_volume]
```

To get fundamental data for Equities in your algorithm, use the `fundamentals` property of the `Equity` objects. The fundamental data represent the corporate fundamentals for the current algorithm time.

```python
fundamentals = self.securities[symbol].fundamentals
```

To get fundamental data for Equities, regardless of whether or not you have subscribed to them in your algorithm, call the `fundamentals` method. If you pass one `Symbol`, the method returns a `Fundamental` object. If you pass a list of `Symbol` objects, the method returns a list of `Fundamental` objects.

```python
# Single asset
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals(ibm)

# Multiple assets
nb = Symbol.create("NB", SecurityType.EQUITY, Market.USA)
fundamentals = self.fundamentals([ nb, ibm ])
```

## Historical Data

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

### Historical Data in Algorithms

To get historical fundamental data in an algorithm, call the `history` method with `Fundamental` type and the Equity `Symbol`. If there is no data in the period you request, the history result is empty.

```python
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)

# DataFrame of fundamental data for a given asset
df_history = self.history(Fundamental, ibm, timedelta(30), flatten=True)

# Fundamental objects
fundamental_history = self.history[Fundamental](ibm, timedelta(30))

# Fundamentals objects for all US Equities (including delisted companies)
fundamentals_history = self.history[Fundamentals](timedelta(30))

# DataFrame of fundamental data for universe constituents
df_history = self.history(self._universe, 30, Resolution.DAILY, flatten=True)

# Series of fundamental data for universe constituents
series_history = self.history(self._universe, 30, Resolution.DAILY)
for (universe_symbol, time), fundamental in series_history.items():
    most_liquid = sorted(fundamental, key=lambda x: x.dollar_volume)[-5:]
```

### Historical Universe Data in Research

To get historical universe data in the Research Environment, call the `universe_history` method with the `Universe` object and the lookback period. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

```python
# DataFrame of fundamental data for universe constituents
df_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time, flatten=True)

# Series of fundamental data for universe constituents
series_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (universe_symbol, time), fundamentals in series_history.items():
    for fundamental in fundamentals:
        print(f"{fundamental.symbol} dollar volume at {fundamental.end_time}: {fundamental.dollar_volume}")
```

For more information about historical US Equity fundamental data, see [Equity Fundamental Data](https://www.quantconnect.com/docs/v2/research-environment/datasets/equity-fundamental-data.md).

## Downloading Data

You can download the US Equity Coarse Universe dataset to your local machine to run the LEAN engine locally with the [LEAN CLI](https://www.quantconnect.com/docs/v2/lean-cli.md). For the download commands, prerequisites, and pricing, see [US Equity Coarse Fundamental](https://www.quantconnect.com/docs/v2/lean-cli/datasets/quantconnect/us-equity-coarse-fundamental.md) in the LEAN CLI documentation.

## Example Applications

The US Equity Coarse Universe dataset enables you to accurately design a universe of US Equities. Examples include the following strategies:

- Selecting securities with the largest dollar volume
- Selecting securities within a specific price range
- Selecting securities that have fundamental data available (together with [MorningStar Fundamental data](https://www.quantconnect.com/datasets/morning-star-us-fundamentals) in `Fundamental` objects)

### Classic Algorithm Example

The following example algorithm creates a dynamic universe of the three most liquid US Equities. Each time the universe changes, the algorithm forms an equal-weighted portfolio of the three companies.

```python
from AlgorithmImports import *

class USEquityCoarseUniverseConstituentsDataAlgorithm(QCAlgorithm):

    _number_of_symbols = 3
    _changes = None

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)
        # Set Asynchronous to True to improve speed performance.
        self.universe_settings.asynchronous = True
        # Add a universe of US Equities.
        universe = self.add_universe(self._select_assets)
        # Get historical data for the universe.
        history = self.history(universe, 30, Resolution.DAILY, flatten=True)

    def _select_assets(self, fundamental: List[Fundamental]) -> List[Symbol]:
        # Select the top traded stocks, since they are the most popular
        # with high capital flow.
        return [
            x.symbol for x in sorted(
                fundamental, key=lambda x: x.dollar_volume
            )[-self._number_of_symbols:]
        ]

    def on_data(self, slice: Slice) -> None:
        # If we have no changes, do nothing.
        if not slice.bars or self._changes is None:
            return
        # Liquidate removed securities, since they are not the most
        # popular stocks.
        for security in self._changes.removed_securities:
            if security.invested:
                self.liquidate(security.symbol)
        # We want 1/N allocation for each security in our universe to
        # evenly dissipate risk.
        for security in self._changes.added_securities:
            self.set_holdings(security.symbol, 1 / self._number_of_symbols)
        self._changes = None

    def on_securities_changed(self, changes: SecurityChanges) -> None:
        self._changes = changes
```

### Framework Algorithm Example

The following example algorithm creates a dynamic universe of the three most liquid US Equities and forms an equal-weighted portfolio with them.

```python
from AlgorithmImports import *

class USEquityCoarseUniverseConstituentsDataAlgorithm(QCAlgorithm):

    _number_of_symbols = 3

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

        # Set Asynchronous to True to improve speed performance
        self.universe_settings.asynchronous = True

        # Requesting data
        self.set_universe_selection(
            FundamentalUniverseSelectionModel(self.fundamental_selection_function))

        # we want 1/N allocation in each security in our universe to evenly dissipate risk
        self.set_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(1)))
        self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())

        self.add_risk_management(NullRiskManagementModel())

        self.set_execution(ImmediateExecutionModel())

    def fundamental_selection_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        # Select the top traded stocks, since they are the most popular with high capital flow
        sorted_by_dollar_volume = sorted(fundamental, key=lambda x: x.dollar_volume, reverse=True)
        return [ x.symbol for x in sorted_by_dollar_volume[:self._number_of_symbols] ]
```

### Research Example

The following example lists the three most liquid US Equities:

```python
qb = QuantBook()

# Add Fundamental Universe Selection
def fundamental_selection_function(fundamentals):
    selected = sorted(fundamentals, key=lambda x: x.dollar_volume, reverse=True)[:10]
    return [x.symbol for x in selected]

universe = qb.add_universe(fundamental_selection_function)

# Historical Universe data
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (universe_symbol, time), fundamentals in universe_history.items():
    for fundamental in fundamentals:
        print(f"{fundamental.symbol} dollar volume at {fundamental.end_time}: {fundamental.dollar_volume}")
```

## Data Point Attributes

The US Equity Coarse Universe dataset provides its data within `Fundamental` objects, which have the following . The attributes from `market_cap` to `asset_classification` listed in the following widget are NaN until this dataset is combined with the [MorningStar Fundamental](https://www.quantconnect.com/datasets/morning-star-us-fundamentals) dataset.

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