frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Deterministic and AI-agent broker import to prevent portfolio data corruption

https://www.portfolio-terminal.com/demo
1•julien_devv•2h ago

Comments

julien_devv•2h ago
Hi HN — I’m building Portfolio Terminal to solve a specific problem:

Broker exports are inconsistent (CSV/JSON/PDF, locale formats, ISIN/ticker mismatches), and one bad parse can silently corrupt portfolio cost basis.

I ended up with a deterministic-first + AI-fallback pipeline:

- Step 1 (deterministic parser): parse JSON/CSV locally, including semicolon CSV, EU/US number formats, date-first rows, and duplicate symbol aggregation. - Step 2 (AI import agent): only if local parsing fails, call an LLM (text/vision) to extract strict JSON positions. - Step 3 (guardrails): normalize symbols, reject invalid qty/price rows, attach confidence per row. - Step 4 (human verification): user reviews/edits rows before write. - Step 5 (state-safe apply): import in either snapshot or additive mode, with explicit transaction synthesis (BUY/SELL diffs) and conservative avg-price rules to avoid cost-basis drift.

I also added a separate AI “Oracle” agent for portfolio Q&A with structured output: { answer, confidence, metricsUsed, why } — to keep responses explainable and auditable.

Stack: Next.js 16, React 19, TypeScript, Prisma/Postgres.

I’d love technical feedback on: 1) deterministic vs LLM boundary, 2) import invariants I should enforce, 3) audit trail design for replay/debug of imports.

Demo: https://www.portfolio-terminal.com/demo

julien_devv•2h ago
A few concrete implementation details:

- Local parser intentionally rejects ambiguous free text and only accepts strict tabular/JSON shapes. - Number parsing is strict (e.g., rejects mixed alphanumeric like “qty=10”), with locale normalization. - Symbol normalization handles common aliases (e.g., “S&P 500” -> SPY, “Bitcoin” -> BTC-USD). - In additive mode, avg price is only recomputed when incoming qty > 0 and incoming avg is reliable. - In snapshot mode, absent imported symbols are explicit delete candidates (normalized set diff). - LLM path is schema-constrained in prompt and then revalidated server-side before persistence.

Goal is not “fully autonomous AI”, but reducing manual import pain while keeping deterministic safety and user control.

The beauty and terror of modding Windows

https://windowsread.me/p/windhawk-explained
1•wild_pointer•3m ago•0 comments

Show HN: Oxmgr – a lightweight PM2 alternative written in Rust

1•vladimir-urik•4m ago•0 comments

Anti-Corporatization of Schools

https://nancyebailey.com/corporatization/
1•robtherobber•7m ago•0 comments

Fast-Servers: An Interesting Pattern

https://geocar.sdf1.org/fast-servers.html
1•birdculture•7m ago•0 comments

Ask HN: Who still works async and has a 'no meetings' work policy in 2026?

3•RaulOnRails•11m ago•0 comments

Can You Train a Computer?

https://twitter.com/DimitrisPapail/status/2028669695344148946
1•vismit2000•11m ago•0 comments

Gemini CLI Explained: Everything You Need to Know About Google's AI Coding Agent

https://www.theneuron.ai/explainer-articles/gemini-cli-explained-everything-you-need-to-know-abou...
1•mariuz•12m ago•0 comments

Show HN: Gnosis – Turns pull requests into guided walkthroughs

https://github.com/oddur/gnosis
2•oddurmagnusson•13m ago•1 comments

Lunar Eclipse 2026: How to take the best blood moon photos with your phone

https://mashable.com/article/blood-moon-total-lunar-eclipse-2026-phone-photos
1•smurda•13m ago•0 comments

It's never just that simple

https://www.neverjust.net/
1•itzlambda•14m ago•0 comments

Agent Policies; codify rules and automate agent guidance

https://blog.devleaps.nl/agent-policies-guidance-for-ai-8a03ea20bbca
1•philipp-gayret•15m ago•0 comments

Show HN: WhisprMe – Anonymous messaging inside Telegram with Stars micropayments

https://whisprme.app
1•paulbrickman•17m ago•0 comments

Show HN: Logos – a scripting language for when Bash gets unreadable after line 3

https://github.com/codetesla51/logos
1•uthmandev•21m ago•0 comments

Spec and Data

1•alfarez•21m ago•0 comments

China's 450kmph bullet train is the fastest ever built

https://www.executivetraveller.com/news/china-cr450-world-s-fastest-bullet-train
2•teleforce•23m ago•0 comments

Become a Coder DJ

https://loopmaster.xyz/dj?hn
1•stagas•24m ago•0 comments

Show HN: TrustStack – Vendor Review with Evidence Pack, Diff and Approval Log

https://b2apps-hwbghfetgtamcmfb.japanwest-01.azurewebsites.net/demo
1•hodachi•25m ago•0 comments

I Always Wanted to Know My True Age – So I Built a Tool to Find Out

https://medium.com/@filipacsr/i-always-wanted-to-know-my-true-age-so-i-built-a-tool-to-find-out-c...
1•filipacsr•30m ago•0 comments

Fixpoints to think clearly

https://blog.yellowflash.in/posts/2026-03-03-fixpoints-for-clarity.html
1•yellowflash•33m ago•0 comments

Dec PDP-8 emulator running FOCAL 69 in 4K for Arduino DUE and Arduino MEGA 2560

https://www.hackster.io/news/nino-ivanov-brings-dec-s-pdp-8-minicomputer-out-of-the-60s-and-onto-...
1•JPLeRouzic•38m ago•0 comments

Show HN: Open-Source Article 12 Logging Infrastructure for the EU AI Act

1•systima•40m ago•0 comments

Show HN: OpenClaw agents that read the same task board and mention each other

https://squadofagents.com/
1•jacobsyc•46m ago•0 comments

SOEL – A programming language that's a language

https://github.com/BankStrategy/SOEL
1•liszper•46m ago•1 comments

Equality as a Consolation Prize

https://www.writingruxandrabio.com/p/equality-as-a-consolation-prize
1•barry-cotter•47m ago•0 comments

How close is the EU to break free from Visa and Mastercard's grip?

https://www.euronews.com/my-europe/2026/03/03/how-close-is-the-eu-to-break-free-from-visa-and-mas...
2•202508042147•48m ago•0 comments

Ask HN: What are you working on (March 2026)

4•ludovicianul•50m ago•2 comments

Scaling Time Series to Millions of Cardinalities

https://itnext.io/scaling-time-series-to-millions-of-cardinalities-greptimedbs-flat-format-7a9d67...
1•xzhuang1984•50m ago•0 comments

Show HN: I Built Systems AGI – 1600 Verticals, Self-Healing, Self-Evolving

1•Apinok1985•50m ago•0 comments

Building vs Digging

https://bgthread.github.io/an-identity-crisis-in-engineering/
1•tewr•52m ago•0 comments

CPU Cache Flushing Fallacy (2013)

https://mechanical-sympathy.blogspot.com/2013/02/cpu-cache-flushing-fallacy.html
1•tosh•53m ago•0 comments