Clean multi-vintage 'ctime' files: 1,065 files, 2.2M stale rows

Some dump files carry a trailing 'ctime' column: an older pipeline
appended a FULL re-download of the symbol per download (up to ~28
vintages per date, 2019-2022). The consumer keeps the last row per date,
so it silently used stale (~2021) vintages where Yahoo later revised
values. scripts/clean_multivintage.py keeps, per date, the rows from the
newest ctime (event files keep distinct same-day amounts; history/split
keep the single newest row), drops the ctime column, sorts by date.
Applied to the data root and overrides/frozen (which carried the same
artifact): 1,065 files, 2,202,712 stale rows dropped.

Also: stripped 3 UTF-8 BOMs (teg/lo/krft), refreshed the event backup
with the cleaned files, and re-ran the double-listing scan: category C
(83 symbols, 18,636 repeated within-file rows) is fully explained by the
multi-vintage artifact and is now gone; A (6,589 pairs, corrected) and
B (12,366 pairs, open review list) are unchanged. Whole-set structural
QC after cleaning: 0 duplicate dates, 3 syms/15 rows of OHLC invariant
violations, 15 syms/2,897 rows of non-positive prices (mostly
long-delisted tickers), 8 unsorted files (reader sorts).
This commit is contained in:
gmp
2026-08-31 22:25:02 -04:00
parent bb8e39605e
commit 3c5bee96ce
250 changed files with 47196 additions and 358144 deletions
+9 -9
View File
@@ -1,9 +1,9 @@
Date,Dividends,ctime
2019-09-23,0.09,2020-04-10 15:54:41
2018-06-19,0.092,2020-04-10 15:54:41
2018-09-25,0.108,2020-04-10 15:54:41
2018-03-16,0.074,2020-04-10 15:54:41
2019-03-19,0.096,2020-04-10 15:54:41
2019-06-24,0.101,2020-04-10 15:54:41
2019-12-23,0.132,2020-04-10 15:54:41
2018-12-26,0.101,2020-04-10 15:54:41
Date,Dividends
2018-03-16,0.074
2018-06-19,0.092
2018-09-25,0.108
2018-12-26,0.101
2019-03-19,0.096
2019-06-24,0.101
2019-09-23,0.09
2019-12-23,0.132
1 Date Dividends ctime
2 2019-09-23 2018-03-16 0.09 0.074 2020-04-10 15:54:41
3 2018-06-19 0.092 2020-04-10 15:54:41
4 2018-09-25 0.108 2020-04-10 15:54:41
5 2018-03-16 2018-12-26 0.074 0.101 2020-04-10 15:54:41
6 2019-03-19 0.096 2020-04-10 15:54:41
7 2019-06-24 0.101 2020-04-10 15:54:41
8 2019-12-23 2019-09-23 0.132 0.09 2020-04-10 15:54:41
9 2018-12-26 2019-12-23 0.101 0.132 2020-04-10 15:54:41