f/tests
Greg Pomerantz c4e7b05f09 Fix non-daily rebalancing (never fired), flat-bench beta div-by-zero, nil-token columns
- portfolio._rebalance_dates: Grouper labels groups with period-END
  timestamps (Sundays, month/quarter/year ends) that never exist in a
  trading-day index, so 1W/1ME/QE/YE silently never rebalanced (only
  1D and buy-and-hold worked). Now takes the first trading day of each
  group.
- metrics.beta_alpha: guard var(bench) == 0 (flat benchmark) instead of
  dividing by zero.
- data._read_csv_clean: the downloader has written Go nil tokens
  ('%!f(<nil>)') into price cells (89 symbols, one bad day each), which
  made pandas infer the whole column as string and crash every
  pct_change on any portfolio containing them. Coerce all columns to
  numeric (nil tokens -> NaN); parquet cache rebuilt (0 string cols).
- new tests/test_portfolio.py (18 checks: rebalance dates land on
  trading days and actually fire, flat-benchmark beta, nil-token
  columns), wired into run_tests.sh (now 5 sections).
- full suite: 30 + 22 + 18 + 38 AppTest + 12 browser e2e, all passing
2026-10-24 18:06:38 -04:00
..
test_app.py Statistics tab: use the BIL daily total return as rf (Fund Lab convention) 2026-09-02 07:03:17 -04:00
test_data.py Fix Yahoo total-distribution double count (1,957 syms) 2026-09-01 16:23:03 -04:00
test_e2e_browser.py Stock & Portfolio Analyzer: full UI rework 2026-08-24 16:05:27 -04:00
test_fundlab.py CEF stage 2b: per-share financial-highlights parser (cef_annual.py) 2026-08-28 07:30:16 -04:00
test_portfolio.py Fix non-daily rebalancing (never fired), flat-bench beta div-by-zero, nil-token columns 2026-10-24 18:06:38 -04:00
test_tax.py Tax engine: fix loss-pool corruption, wash double-subtract, progressive keep 2026-10-23 10:21:43 -04:00