Skip to content

Commit de3257d

Browse files
committed
Fill 17,252 empty exchange + market cells in equities.csv
Two passes: **Pass 1 (deterministic, 17,240 rows)**: for every row with `exchange` empty AND a recognisable ticker suffix (`.NX`, `.F`, `.DU`, `.MI`, ...), derive the canonical exchange code from rows that already have that same suffix populated. No external API. The mapping is unambiguous at >=99% per suffix (verified before applying): | Suffix | Exchange | Rows | |---|---|---:| | .NX | ENX (Euronext) | 11,364 | | .F | FRA (Frankfurt) | 3,068 | | .DU | DUS (Dusseldorf) | 624 | | .BE | BER (Berlin) | 370 | | .MI | MIL (Borsa Italiana) | 349 | | .MU | MUN (Munich) | 247 | | .SG | STU (Stuttgart) | 218 | | .OL | OSL (Oslo) | 115 | | .TI | TLO (EuroTLX) | 115 | | .ST | STO (NASDAQ OMX Stockholm) | 89 | | .BO | BSE (BSE India) | 75 | | .PA | PAR (Euronext Paris) | 70 | | .VI | VIE (Vienna) | 68 | | .MX | MEX (Mexico) | 63 | | Other suffixes | various | ~405 | **Pass 2 (external resolution, 12 rows)**: for the 98 remaining rows (US-style symbols with no suffix and every other column NaN — failed scrapes), query yfinance and Finnhub. yfinance resolved 9; Finnhub's US universe endpoint resolved 3 more (MIC mapping: XNYS->NYQ, XNAS->NMS, OOTC->PNK). TradingView returned no additional matches on this set. Stats: * 17,240 deterministic suffix-based fills * 12 external resolution fills (9 yfinance + 3 Finnhub) * 17,252 `exchange` cells filled (was: 17,338 empty before) * 17,252 `market` cells also filled (inherited from canonical `exchange -> market` mapping) * 86 rows still empty: US-style symbols not found in any free data source (delisted warrants/units like `BFT-WT`, `CAS'U`, `CCX'U`, etc.). Out of scope. Validation: passes `test_exchange_market_one_to_one` (introduced in JerBouma#143) — every exchange code in `equities.csv` still maps to exactly one market label. No row with a pre-existing populated `exchange` was modified. Only empty cells filled.
1 parent 6d1462a commit de3257d

13 files changed

Lines changed: 17287 additions & 17287 deletions

database/equities.csv

Lines changed: 17253 additions & 17253 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_search.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_search_3.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_search_4.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_search_5.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_search_8.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_select_10.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_select_12.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_select_2.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change

tests/csv/test_equities/test_select_3.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)