Archived Portfolio accounting
SwingJournal
BriefKnow what a portfolio has actually returned — after currency, withholding tax and fees, across five account types — when the broker hands you a CSV and a percentage.
Reads Trading 212’s own history export and turns it into a GBP portfolio: weighted-average cost, dividends net of withholding tax, splits and cash events, kept apart across Invest, ISA, Cash ISA, SIPP and CFD. The parser is keyed on the header rather than the column order because the awkwardness is all in the source — the “Exchange rate” column means one thing on a trade row and its inverse on a dividend row, London instruments quote in pence against a rate of 100, and dividends arrive with an empty ID so they have to deduplicate on a composite of five other fields. On top of that sits the review the journal exists for: round trips rebuilt from the raw rows, edge statistics, best- and worst-case excursions, time-weighted return against a benchmark, and a what-if lab that drops the outliers or sweeps the stop to price what a rule was actually worth. Each position also carries a written thesis with its own invalidation level, so a decision can be read back against what was believed at the time rather than against how it turned out. The CSVs stay in the browser and every figure is re-derived on load; the database holds only the journal, the thesis records and the price cache. 615 tests.
Next.js
TypeScript
Drizzle
PostgreSQL
Recharts