infra/stacks/wealthfolio
Viktor Barzin 9b68dbc788 wealthfolio: dav_corrected — also exclude Schwab synthetic cash flows
The Net-contribution chart was showing huge negative monthly swings
because broker-sync emits a synthetic cash-flow-match DEPOSIT for every
vest BUY and a WITHDRAWAL for every sell-to-cover SELL. Cumulatively
WITHDRAWALs ($1.06M) exceed DEPOSITs ($498k) — the user perceives this
as having "withdrawn" money even though they never moved cash out of
Schwab. The proceeds left for the bank and surface as real DEPOSITs on
the next account (IE/T212) that the user transfers them to.

Extend the dav_corrected view to subtract Schwab cash-flow-match flows
(DEPOSIT-positive, WITHDRAWAL-negative, account-scoped) in addition to
the existing Fidelity unrealised-gains-offset correction. InvestEngine
and Trading212 cash-flow-match entries are REAL deposits and must be
preserved — scope by Schwab account_id only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 22:52:17 +00:00
..
.terraform.lock.hcl state(dbaas): update encrypted state 2026-05-26 08:59:40 +00:00
backend.tf state(dbaas): update encrypted state 2026-05-26 08:59:40 +00:00
main.tf wealthfolio: dav_corrected — also exclude Schwab synthetic cash flows 2026-05-26 22:52:17 +00:00
providers.tf state(dbaas): update encrypted state 2026-05-26 08:59:40 +00:00
secrets [ci skip] Move Terraform modules into stack directories 2026-02-22 14:38:14 +00:00
terragrunt.hcl wealth: SQLite→PG ETL sidecar + new Grafana dashboard 2026-04-25 17:07:33 +00:00