Skip to content

data_updater_v2.tables.constituents

constituents.py — the raw index-membership table: what each index held and when it changed, as FMP tells it, with our ids.

index_constituents (index_symbol, symbol, date, event) one line of an index's story:
a ticker ``added`` to or ``removed`` from the index on a day (FMP's
change history: S&P 500 back to 1957, Nasdaq 100 to 1985, Dow 30 to
1994), or a ``member`` seen in today's list on the day it was read
(the anchor the history is reconciled against). The index is one of
our index universe's (GSPC, NDX, DJI: ``index_id`` its era); the
constituent carries our ids where the catalog holds the ticker
(``global_id`` / ``id``, null together otherwise). dbt builds the
membership spans and the day-by-day table from these lines.

Market facts only: no provider, fetched_at or run columns — in_fmp says who told it.

Classes

IndexConstituent

Bases: Base

One line of an index’s membership story, as told.