f/tests
Greg Pomerantz 19b33d5a18 Add NIIT + state/local rates to the after-tax model (NYC support)
NYC residents pay, on a capital-gain distribution, roughly 20% federal
+ 3.8% NIIT + 6.85-9.65% NY + 3.876% NYC = ~34-37% — the old model's
flat 20% understated the real after-tax drag of high-distribution
funds for this user by ~15 points on exactly the flows that matter.

tax.py: new niit + sl_rate params (decimals). sl_rate is the
state+local marginal rate applied at ORDINARY rates to every flow —
state and local have NO preferential cap-gain rate, so the composite
is lt_rate+niit+sl_rate on cap-gain dists, div_rate+niit+sl_rate on
dividends, and (st/lt_rate)+niit+sl_rate on realized gains.

app.py: two new sidebar fields (persisted in settings.json), wired
through _compute_portfolio's cache key.

tests/test_tax.py: 3 new cases (capg and div composite rates,
net-taxed realized ST gains/losses at st+NIIT+SL).

README: NYC rate note with the 2025 IT-201 schedule values (NYC 3.876%
over $50k; NY 6.85% at $215,400-$1.077M, 9.65% at $1.077M-$5M,
single filer) and the composite example.
2026-09-01 09:37:58 -04:00
..
test_app.py app: background cache refresh, per-benchmark stats, correlation tab, global date range 2026-08-25 18:15:47 -04:00
test_data.py Repair Yahoo adj-close/event-date misalignment (JLPSX, JLPYX) 2026-08-31 23:08:42 -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_tax.py Add NIIT + state/local rates to the after-tax model (NYC support) 2026-09-01 09:37:58 -04:00