---
title: "Liquidity Universes"
description: "A liquidity universe lets you select a set of stocks with the greatest dollar volume in the market."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/universes/equity/liquidity-universes
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/universes/equity/liquidity-universes.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/12%20Universes/03%20Equity/01%20Liquidity%20Universes
modified: 2026-10-31
index: https://www.quantconnect.com/llms.txt
---

# Liquidity Universes

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Universes > [Equity](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/equity.md) > Liquidity Universes

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

## Introduction

A liquidity universe lets you select a set of stocks with the greatest dollar volume in the market.

## Create Universes

To add a dollar volume universe, call the `universe.dollar_volume.top` helper method and pass the result to the `add_universe` method.

```python
# Add the 50 stocks with the highest dollar volume.
self.universe_settings.asynchronous = True
self.add_universe(self.universe.top(50))
```

## Selection Frequency

Equity universes run on a daily basis by default. To adjust the selection schedule, see [Schedule](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/settings.md#10-Schedule).

## Examples

The following examples demonstrate some common liquidity universes for US Equities.

### Example 1: Minute-Resolution Universe

The following algorithm [asynchronously selects](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/settings.md#09-Asynchronous-Selection) the 10 most liquid US Equities as the universe. It uses [minute resolution](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/settings.md#02-Resolution) data to provide the most realistic results.

```python
class MinuteLiquidUniverseAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        # Use asynchronous universe selection to speed up your algorithm.
        self.universe_settings.asynchronous = True
        # Use minute resolution data so orders fill at realistic prices.
        self.universe_settings.resolution = Resolution.MINUTE
        # Add a universe of the 10 most liquid US Equities.
        self.add_universe(self.universe.top(10))
```

### Example 2: Trade Liquid Assets off Bollinger Bands

The following algorithm [asynchronously selects](https://www.quantconnect.com/docs/v2/writing-algorithms/universes/settings.md#09-Asynchronous-Selection) the 500 most liquid US Equities as the universe. Each day, it forms a portfolio of the assets in the universe that are below their lower [Bollinger Band](https://www.quantconnect.com/docs/v2/writing-algorithms/indicators/supported-indicators/bollinger-bands.md) .

```python
class AsynchronousLiquidUniverseAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.settings.automatic_indicator_warm_up = True
        # When a new asset enters the universe, seed its current price so you can trade it right away.
        self.settings.seed_initial_prices = True
        # Use asynchronous universe selection to speed up the algorithm.
        self.universe_settings.asynchronous = True
        # Use daily data. It doesn't affect accuracy since the trades fill at the daily market open.
        self.universe_settings.resolution = Resolution.DAILY
        # Add a universe of the 500 most liquid Equities.
        self._universe = self.add_universe(self.universe.top(500))

    def on_securities_changed(self, changes: SecurityChanges) -> None:
        # Create Bollinger Band indicators for the universe constituents.
        for security in changes.added_securities:
            security.bb = self.bb(security.symbol, 60, 2)
        # Deregister the indicators when assets leave the universe.
        for security in changes.removed_securities:
            self.deregister_indicator(security.bb)

    def on_data(self, slice: Slice) -> None:
        # Ensure there are TradeBar objects in the current slice.
        if not slice.bars:
            return
        # Select the Equities that are below their lower Bollinger Band.
        securities = [self.securities[symbol] for symbol in self._universe.selected]
        selected = [
            security for security in securities
            if security.bb.is_ready and security.price and security.price < security.bb.lower_band.current.value
        ]
        # Form an equal-weighted portfolio with the selected assets.
        weight = 1 / len(selected)
        self.set_holdings([PortfolioTarget(security.symbol, weight) for security in selected], liquidate_existing_holdings=True)
```

### Other Examples

For more examples, see the following algorithms:

**Demonstration Algorithms**

- [UniverseSelectionDefinitionsAlgorithm.py](https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/UniverseSelectionDefinitionsAlgorithm.py) (Python)
