Skip to content

Baskets and Universes

A Basket (also called a Universe) is a named collection of financial instruments used as the trading universe for strategies. Instead of specifying individual tickers like AAPL, MSFT, or GOOG one by one, strategies can reference a basket like EQ:GSPC (S&P 500) to automatically include all constituents of that index.

Baskets serve two key purposes in Stratifyre:

  1. Static Grouping: Easily group instruments by category (e.g., “GSPC” for S&P 500, “NDX” for Nasdaq 100, or “MajorCryptoPairs” for crypto).
  2. Historical Composition Tracking: Track which instruments were added or removed from the basket over time to avoid survivorship bias when backtesting.

When backtesting a strategy today, using today’s S&P 500 constituents to test historical performance from 10 years ago is fundamentally flawed — you are only testing companies that survived to today and potentially ignoring companies that went bankrupt.

Stratifyre’s Basket tracking solves this by:

  • Automatically loading all instruments that were ever in the basket during your historical backtest period.
  • Processing add/remove events at the correct historical times (e.g. adding newly admitted stocks or delisting failed stocks exactly when it occurred).
  • Ensuring strategies only evaluate instruments that were actually in the basket at that exact point in time.

Baskets make it easy to build strategies that replicate or track broad indices. You can define index-based rules, such as:

  • Sector rotation within an index.
  • Relative strength ranking across Nasdaq 100 constituents.
  • Equal-weight index strategies.

If a market changes, you don’t need to manually update your strategy to reflect a new index composition. Strategies dynamically adapt as index constituents rotate.

To use a basket, update your strategy’s configuration to use the basket selection mode:

Available Baskets: Baskets follow the format {AssetClass}:{BasketName}. Common examples include:

  • EQ:GSPC — S&P 500
  • EQ:NDX — Nasdaq 100
  • EQ:DJI — Dow Jones Industrial Average

When you assign a basket to a strategy or scanner, Stratifyre will automatically handle determining the right instruments for either real-time scanning or historically accurate backtesting.