frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

What invariants would you enforce for broker import pipelines?

2•julien_devv•1h ago
I’m working on a broker import pipeline for retail portfolios, and I underestimated how messy exports are in practice.

Problems I’ve seen: - CSV, JSON and PDF exports for the same broker - EU/US number formats - date-first vs month-first ambiguity - ISIN/ticker/name mismatches - duplicate rows and partial positions - bad parses silently corrupting cost basis

My current approach is deterministic-first: 1. parse structured exports locally 2. only use an LLM fallback when parsing fails 3. normalize symbols and reject invalid rows 4. require human review before persistence 5. apply imports conservatively to avoid cost-basis drift

I’m trying to think clearly about the invariants this system should enforce.

For those who’ve worked on financial imports, accounting systems, or safety-critical data pipelines: - what invariants would you absolutely enforce? - where would you draw the boundary between deterministic logic and LLM extraction? - what would you log for replay/debug/auditability?

Happy to share implementation details if useful.