Files
sure/app/models
FalloutmanandJustin fc130a1957 fix: add Schwab to SimpleFIN total-basis cost_basis allowlist (#2986)
Charles Schwab's SimpleFIN feed reports `cost_basis` as the total
position cost rather than per-share, violating the spec in the same
way Vanguard (#1182) and Fidelity (#1718) already do. Schwab wasn't on
the TOTAL_BASIS_INSTITUTIONS allowlist, so the raw total was stored
directly into holdings.cost_basis and treated as per-share downstream.

Holding#calculate_trend multiplies avg_cost by qty again when
reconstructing original cost, so an unadjusted total gets squared by
share count — a $46,950 position with a true +55.7% gain rendered as
-99.8% / -$19.6M "return" on the dashboard and per-account holdings
views.

Picks up where #2626 left off: adds the allowlist entry, fixes the
now-outdated compliant-institution test case it broke, and adds a
dedicated regression test using real observed Schwab payload values.

Fixes #2626

Co-authored-by: Justin <justin@local>
2026-08-10 07:20:55 +02:00
..
2026-03-25 17:47:04 +01:00
2026-03-25 10:50:23 +01:00
2026-03-25 10:50:23 +01:00