Skip to main content

Index Constitution

中文

Purpose

This repository was created to make it easier to train quantitative models on major stock indices. Reliable historical index composition data (constituent additions and removals over time) is notoriously hard to obtain — vendors often charge for it, official sources are scattered across PDFs and announcements, and free APIs rarely expose point-in-time membership. Without this data, backtests suffer from survivorship bias and lookahead bias.

This repo collects and normalizes that information into plain CSV files so it can be consumed directly by research and modeling pipelines.

Datasets

Index Description Source Latest constituents
CSI 300 Top 300 A-share stocks listed on the Shanghai and Shenzhen exchanges Official announcements from China Securities Index Co. (csindex.com.cn) Eastmoney: CSI 300 constituents
CSI 500 500 mid-cap A-share stocks listed on the Shanghai and Shenzhen exchanges Official announcements from China Securities Index Co. (csindex.com.cn) Eastmoney: CSI 500 constituents
S&P 500 500 leading large-cap U.S. companies listed on U.S. exchanges Wikipedia: List of S&P 500 companies Wikipedia: S&P 500 component stocks
NASDAQ-100 100 largest non-financial companies listed on the Nasdaq Stock Market Wikipedia: NASDAQ-100 Nasdaq: NASDAQ-100 Index quotes
Dow Jones Industrial Average 30 large U.S. blue-chip companies in the Dow Jones Industrial Average Wikipedia: Dow Jones Industrial Average and Wikipedia: Historical components of the Dow Jones Industrial Average Wikipedia: Dow Jones Industrial Average components

Python package

This repo also ships a small Python library that embeds the CSVs and exposes them as pandas DataFrames.

Install:

pip install index-constitution

Usage:

import index_constitution as ic

ic.list_indices()                    # ['csi300', 'csi500', 'sp500', 'nasdaq100', 'dow30']

ic.latest("sp500")                   # current S&P 500 members
ic.latest("dow30")                   # current Dow 30 members
ic.history("csi300")                 # full CSI 300 history with opt-in/opt-out
ic.constituents_at("sp500", "2015-06-30")   # point-in-time membership
ic.is_member("sp500", "AAPL", "2020-01-02") # True
ic.events("sp500")                   # ticker/name change audit trail
ic.symbol_status("sp500", "ABMD")   # whether a historical symbol is still directly usable

Ticker and name changes

history/*.csv and latest/*.csv use the current canonical ticker and namefor each company across the full membership span. For example, S&P 500 historylists Meta Platforms only as META, even for the period when it traded as FB. The event/us.csv and event/cn.csv files are the audit trail for those changes.

This canonicalization is strongest for pure ticker/name changes. When an event row includes new_symbol, it means this dataset treats the new ticker as the usable successor for historical lookup. For example, FB -> META means you can use META to access the full history for that company in this dataset.

delisting means the old ticker was retired and is no longer directly usable. In that case new_symbol and new_name are left empty because this dataset does not treat any other ticker as its direct successor. For example, ABMD remains valid historical S&P 500 membership data, but the symbol itself stopped trading after Johnson & Johnson acquired Abiomed.

Events are not scoped to a single index — a corporate ticker or name change applies to every index that includes the company. ic.events("sp500") filters the table to events whose old or new symbol ever appeared in S&P 500 history.

is_member() and constituents_at() are strict — they do not resolve old tickers automatically. Use ic.events("sp500") or ic.symbol_status() to tell whether an old symbol maps to a usable successor ticker or is simply delisted.

Use Cases

  • Check the current constituents of an index
  • Reconstruct point-in-time index membership for backtesting
  • Avoid survivorship bias when training quantitative models
  • Keep a consistent structure for adding more indices later

Metadata

Release files for index-constitution 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for index-constitution 1.0.1
File Size Uploaded Provenance Actions
index_constitution-1.0.1.tar.gz 80.7 kB With provenance Details for index_constitution-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for index-constitution 1.0.1
File Interpreter ABI Platform Actions
index_constitution-1.0.1-py3-none-any.whl Python 3 none any Details for index_constitution-1.0.1-py3-none-any.whl

Total release size: 179.8 kB

Release files / index_constitution-1.0.1.tar.gz

Download URL index_constitution-1.0.1.tar.gz
Size 80.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6db645464f78903f2a9bb77ea369dce21a76c4d6b0446b5644cbfa0fe020422d
BLAKE2b-256 checksum
How to use checksums
9b4970a5af72e3598e96489029b7b1592e08a9cb9fe518e9b64817947a37ac65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / index_constitution-1.0.1-py3-none-any.whl

Download URL index_constitution-1.0.1-py3-none-any.whl
Size 99.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fef843ffeab64c43a67168e919f7d6682d32edc23b2b9f6fcd90a6c90e6a2a6c
BLAKE2b-256 checksum
How to use checksums
35b5138a3fb637dfdc8057c702516a5a7e595aafc0eb542796dd46a747c67a90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for index-constitution 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for index_constitution-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page