Skip to content

Commit 46db4bb

Browse files
committed
Clean up exchange/market column inconsistencies + add consistency test
Per maintainer feedback on #143: keep `exchange` and `market` columns in lock-step. Fixed 87 rows where the short code and the human-readable label did not agree. Category A — exchange code non-canonical, market is correct (84 rows): * NAS (12 rows, market "NASDAQ Global Select") -> NMS * NYS (72 rows, market "New York Stock Exchange") -> NYQ Category B — market label is wrong, exchange is correct (3 rows): * BTS-CATG (Leverage Shares 2X Long CAT Daily ETF on BATS BZX): market "OTC Bulletin Board" -> "BATS BZX Exchange" (Verified via Leverage Shares / Robinhood / Benzinga.) * NCM-CAPS (Capstone Holding Corp. on NASDAQ Capital Market): market "OTC Bulletin Board" -> "NASDAQ Capital Market" * NSI-LT.NS (Larsen & Toubro on NSE India, .NS suffix confirms): market "Metropolitan Stock Exchange" -> "National Stock Exchange of India" After the fix every exchange code in equities.csv maps to exactly one market label. Added `tests/test_equities.py::test_exchange_market_one_to_one` that asserts the forward direction (exchange -> 1 market) so future PRs cannot silently re-introduce the kind of drift fixed here. The reverse direction is intentionally not asserted: a market label may legitimately cover several exchange tiers (e.g. "OTC Bulletin Board" covers PNK / OQB / OID / OEM / OQX).
1 parent 24afca9 commit 46db4bb

2 files changed

Lines changed: 109 additions & 87 deletions

File tree

0 commit comments

Comments
 (0)