Track `delisted` for ETFs and Funds (currently equities-only)
Context
The delisted flag was recently introduced for equities (database/equities/*.csv), and Equities.select() excludes delisted rows by default (exclude_delisted=True).
ETFs and Funds currently have no delisted column, and neither ETFs.select() nor Funds.select() filters on it.
Proposal
Consider extending delisted (or an equivalent closed/liquidated flag) to ETFs and Funds.
Domain rationale: ETFs and especially mutual funds are closed/liquidated very frequently — arguably more often than equities are delisted. A "no longer tradable" signal is just as meaningful for those asset classes, e.g. to filter dead funds out of screens by default.
What's needed / blocker
The main blocker is a data source to populate the flag:
- The equities
delisted=Truevalues were applied in bulk from an external source (commit4a1df57dis a data dump, not a reproducible in-repo computation). - The weekly pipeline (
database_update.yml) only writesdelisted: Falsefor new equity tickers and never computesTrueitself.
So adding the column to ETFs/Funds without a populating source would just yield an always-False/empty column.
Note
The shared filter in helpers.py is already future-proof: it is guarded by "delisted" in columns and is NaN-safe, so the moment a source exists and the column is added to ETF/Fund data, the filtering works with no library change required. (See the related hardening PR.)
Source: JerBouma/FinanceDatabase