Insights
Building a Survivorship-Bias-Free Stock Universe
Alphanume Team · July 22, 2026
Reduce universe survivorship bias by starting with securities eligible on each historical decision date, then keep departed and failed names in every later outcome join.
Alphanume Historical Optionable Tickers stores a point-in-time snapshot on the first trading day of each month. Each row contains date, ticker, avg_days_between, and has_weeklies. That lets a 2020 backtest begin with the optionable names present in 2020 instead of today's list of survivors.
Historical Market Cap supplies dated size and shares outstanding for the same date and ticker. Joining the two creates a monthly universe that can apply size rules as they stood then. The combination improves universe integrity, while prices, delisting outcomes, identifier history, option quotes, and execution data remain separate requirements.
Start from source snapshots
Input | Point-in-time role | What it does not contain |
|---|---|---|
Optionable date | Monthly source snapshot date | Daily option-list changes inside the month |
ticker | Symbol included in that historical snapshot | Permanent company identifier |
avg_days_between | Mean of four gaps after the first observed gap | Option prices, spreads, or open interest |
has_weeklies | Whether that mean is under nine days | Exact weekly contracts or liquidity |
Historical market cap | As-of size and share count | A complete price or delisting-return series |
The optionability snapshot defines eligibility for that month. Its density fields do not prove that specific consecutive weekly contracts existed. A security can list or lose options between snapshots, and the dataset will not show the exact intra-month day. Use a daily source if the strategy requires session-level option-list status.
The survivorship-free universe workflow is a useful implementation companion. The essential rule is that later outcomes never get to decide which historical membership rows remain.
Pull every monthly membership
Query the full 2020 through 2025 range and keep the distinct dates returned by the source. Do not invent calendar month-end or first-calendar-day keys. Historical Optionable Tickers uses keyset pagination ordered by date and ticker, so continue until has_more is false.
import os
import requests
import pandas as pd
url = "https://api.alphanume.com/v1/optionable-tickers"
headers = {"X-API-Key": os.environ["ALPHANUME_API_KEY"]}
params = {"date_gte": "2020-01-01", "date_lte": "2025-12-31"}
rows = []
while True:
response = requests.get(url, headers=headers, params=params, timeout=30)
response.raise_for_status()
payload = response.json()
rows.extend(payload["data"])
if not payload.get("has_more"):
break
cursor = payload["next_cursor"]
params.update({"cursor_date": cursor["date"], "cursor_ticker": cursor["ticker"]})
membership = pd.DataFrame(rows)
assert not membership.duplicated(["date", "ticker"]).any()Save raw pages, distinct snapshot dates, and row counts per date. A sudden count change can be a real eligibility shift or a partial pull. The cursor and count audit distinguishes those cases.
Add dated size without dropping names
Join step | Rule | Audit output |
|---|---|---|
Market cap retrieval | Query each exact optionability snapshot date | Raw pages and has_more state |
Membership join | Left join on date plus ticker | Missing market-cap rows |
Size filter | Apply historical market_cap after the join | Excluded rows retained with reason |
Entity mapping | Attach dated security identifiers | Ticker transitions and unresolved names |
Outcomes | Left join later returns from the frozen universe | Missing, halted, and delisted outcomes |
A market-wide Historical Market Cap range without ticker is limited to seven calendar days. Exact monthly snapshot queries fit the contract and can require pagination. Keep membership on the left so missing capitalization remains a reported coverage failure rather than silently deleting the security.
When a name disappears from later optionability snapshots, retain its earlier rows and follow its outcomes through a dated security master. The departure can reflect delisting, merger, option-list changes, ticker transition, or source coverage. It is not evidence of a zero return by itself. Historical listing status, permanent identifiers, delisting prices, and terminal outcomes still require separate point-in-time sources.
Create a membership transition table between consecutive snapshots with four states: entered, retained, exited, and unresolved identifier. The table is an early warning for accidental survivorship filtering. If every exited ticker also disappears from the outcome frame, the return source or join is removing the exact observations the universe method was designed to retain.
A lower-bias universe still has boundaries
- Monthly cadence. Eligibility changes between snapshots are invisible.
- Optionability versus tradability. Listed expirations do not guarantee narrow spreads, depth, fills, or borrow.
- Ticker continuity. A symbol is not a permanent issuer or security identifier.
- Price survivorship. A point-in-time universe still fails if the return source omits delisted securities.
- Coverage starts. Historical Market Cap begins on different dates across tickers, and missing rows are not zero size.
These two datasets reduce universe survivorship bias for an optionable-equity strategy, but they do not make the full backtest survivorship-bias-free. Free access covers the trailing 20 trading sessions after a one-trading-session delay, so 2020 through 2025 membership and size pulls require historical access. Keep restricted-range errors separate from empty snapshots.
Audit three snapshots first
Pull three consecutive monthly snapshots and export raw membership, exact-date market cap, joined universe, size exclusions, ticker transitions, and missing outcomes. Confirm that a name present only in the first month remains in that month's denominator after it disappears. Then scale the identical process to 2020 through 2025.
Explore the membership fields on the Historical Optionable Tickers page and follow the Historical Optionable Tickers guide before connecting option or equity outcomes.