f/reports
Greg Pomerantz 5e5a10d725 Fix Yahoo total-distribution double count (1,957 syms)
Yahoo's dividend endpoint returns the fund's TOTAL per-share distribution
(dividend + capital gain) for many share classes while the capitalGains
endpoint returns the cap-gain portion separately; summing both double-counted
cap gains and broke pre/post-tax comparability (after-tax engine could beat
the adj-based pre-tax return: impossible).

Add _fix_total_distributions to the bundle-assembly invariants
(layout-agnostic, survives re-downloads): on same-date div>capg events, the
exact Yahoo-adj implied distribution (d = P - Q*A_{t-1}/A_t) must match the
div-file amount (not the sum) on >=3 dates before rewriting div -= capg.
Self-validating: genuine separate same-date distributions are untouched.
Rewrote 17,900 cells on 1,957 symbols.

Pool check (scripts/check_adj_consistency.py): all 14 symbols now
TR(close+events) == TR(adj) to 0.01pt and post < pre with plausible drags.

Tests: rewrite case, no-rewrite case, idempotency (tests/test_data.py).
2026-09-01 16:23:03 -04:00
..
adj_consistency Fix Yahoo total-distribution double count (1,957 syms) 2026-09-01 16:23:03 -04:00
adj_misalign Repair Yahoo adj-close/event-date misalignment (JLPSX, JLPYX) 2026-08-31 23:08:42 -04:00
double_listing Clean multi-vintage 'ctime' files: 1,065 files, 2.2M stale rows 2026-08-31 22:25:02 -04:00
xcheck_official Double-listing: layout-agnostic invariants, whole-dump sweep, bulk corrections 2026-08-31 21:00:36 -04:00
fund_report.html Style-tilt battery + commentary in the fund report pipeline 2026-08-30 20:36:04 -04:00
report_data.json Style-tilt battery + commentary in the fund report pipeline 2026-08-30 20:36:04 -04:00
stale-funds.md Freeze stale (Yahoo-empty) tickers: snapshot final series in overrides/frozen/ 2026-08-31 13:23:24 -04:00