Portfolio System

A multi-asset portfolio operation needed live truth: positions, profit and loss, and risk in real time, replacing broker-statement archaeology performed quarterly by hand. I built a transaction-true portfolio engine — event-sourced accounting, streaming prices, parametric value-at-risk — that turned a reconstruction exercise into a screen.

Who this story is for

Family offices, advisors and desks whose portfolio truth currently lives in a spreadsheet that one person maintains, and where any historical question takes longer to answer than it should.

The situation

The holdings were real, the returns were roughly right, and nobody could prove either quickly. Positions were reconciled against custodian statements quarterly by hand. Corporate actions — splits, bonuses, mergers — were applied when someone noticed. Fees were computed in a workbook that one person fully understood. And review packs were assembled by copy-paste the night before each meeting.

It survived on competence, which is how most of this industry survives. The failure mode arrives the day a client’s chartered accountant computes a different XIRR and asks why — because at that point the honest answer is that the difference cannot be located quickly, and “the spreadsheet had a stale price” is not an answer that retains assets.

What I did

Built the core as a ledger. Every buy, sell, dividend, split, bonus and fee became an immutable event. Positions, cash and returns became projections computed over that history — rebuildable at any moment, replayable to any date. It is the same architecture I use for money systems, wearing an investment jacket, and it means every number on every statement can be traced to the events that produced it.

Handled corporate actions as first-class events with effective dates, so historical returns stopped silently rewriting themselves and tax lots kept their identity through splits and mergers.

Streamed prices with staleness alarms. Market data arrived through a Redis pub/sub layer with snapshot history retained. The alarms mattered more than the speed: a stale price presented confidently is more dangerous than a missing one, because it looks like information.

Added the risk layer. Allocation drift against policy constraints, sector and geography concentration limits, and parametric value-at-risk at 95 and 99 per cent confidence — computed from current positions rather than last quarter’s snapshot. Where the question needed a distribution rather than a point estimate, the Monte Carlo engine took over.

Made reconciliation daily. Custodian and broker statements matched automatically against internal truth, breaks queued with reasons. The quarterly project became a background check.

Instrumented the whole thing. Prometheus metrics on feed latency and calculation throughput, Grafana dashboards, and alerts on service-level breaches — because a portfolio system that silently stops updating is a particular kind of dangerous.

The result

Reconciliation against broker statements became a daily automated check rather than a quarterly reconstruction. Review meetings open with live truth instead of assembled PDFs. And historical questions — what was this position before the merger, what did this client earn net of fees since inception — became queries rather than projects.

[METRIC — sign-off: assets or position count, if shareable]

The change that clients noticed first was subtler than any of that: numbers stopped moving retroactively. Because history is immutable, last quarter’s report says today what it said when it was issued, which removes the most corrosive experience a client can have with an advisor’s reporting.

What it means for you

The engineering here now deploys as the Portfolio Manager product, so a family office or advisory practice can have the build without commissioning the research. The active-desk sibling — positions, limits, end-of-day reconciliation against brokers — is the Trade Desk.

The underlying argument transfers beyond finance: any system where a stored quantity must match an external reality benefits from transaction-truth over snapshots, because the hard questions are always historical.

The three decisions that shaped it

Transaction-truth over snapshots, which was the whole architectural bet. It costs more storage and more thought up front and it is the only version where a historical question has an answer.

Staleness alarms over faster feeds. The instinct is to optimise latency; the actual risk is a price that stopped updating while everything downstream continued to trust it. Alarming loudly on stale data prevented more harm than any speed improvement would have.

Daily reconciliation before any risk dashboard. Risk metrics computed over positions that have not been reconciled carry false authority into decisions, which is worse than having no metrics. That ordering is one I hold to even when the dashboard is what was asked for first.

Each of those trades short-term visible progress for correctness, and each one is why nobody has had to relitigate a number since — which, in a business whose entire product is accuracy about other people’s money, is the outcome that matters most. Everything else on this page is machinery in service of that one property.

/work/risk-modelling — the simulation layer · /products/portfolio-manager — the productised build · /industries/wealth — the trade context · /blog/the-t-1-problem — agreed versus settled, which this system separates

The review-week test

If assembling a quarterly review pack takes a week, that week is reconstruction rather than reporting. /contact — bring last quarter’s pack.