Real-time holdings
Hypertable-backed positions table; latency well under 100ms for a typical advisor book.
TWR for performance. MWR for client-experienced returns. TimescaleDB hypertables for billions of position rows. Pricing service in Python (QuantLib). All locale-aware.
The portfolio bounded context owns six aggregates: Account (open / closed / suspended), Instrument, Position, Transaction, Price, and the per-account PerformanceSnapshot. Positions live in a TimescaleDB hypertable partitioned by month and indexed on (tenant_id, account_id, asof) — billions of rows answer holding queries in tens of milliseconds.
Performance is computed by the pricing service, written in Python around QuantLib and numpy. Time-Weighted Return uses the Modified-Dietz approximation; Money-Weighted Return uses Newton-Raphson IRR. Both calculations cache to Redis with a tenant-scoped key, invalidated on the day’s transactions and end-of-day price updates.
Allocation analytics roll up by asset class, sector, geography, currency, and instrument type. The same data renders correctly for an English-speaking US advisor (USD, sector-by-GICS) and an Arabic-speaking Saudi advisor (SAR, sector-by-Tadawul). Concentration limits and house views are policy data; OPA evaluates them per query and per pre-trade check.
Reporting outputs through the document pipeline. Carbone renders the DOCX, Gotenberg converts to PDF, the formatter pack injects locale-correct numbers and dates. The PDF lives in MinIO with a SHA-256 content address; the audit chain references that address, not the bytes — so you can prove the statement existed at a point in time without copying it twice.
Hypertable-backed positions table; latency well under 100ms for a typical advisor book.
Modified-Dietz approximation; daily, MTD, QTD, YTD, since-inception. Periodicity selectable.
Newton-Raphson IRR for client-experienced returns; cash flow timing matters.
By asset class, sector, region, currency, instrument. House views applied per OPA policy.
Every settlement, dividend, fee, FX adjustment. Reconciled against the custodian feed daily.
Python + QuantLib; supports equities, bonds, ETFs, sukuk, FX forwards, and basic derivatives.
Locale-aware via Carbone; sent through DocuSeal for client acknowledgement when required.
Daily Temporal workflow; cases opened automatically on persistent breaks.
| Metric | What it answers | How we compute | When we use it |
|---|---|---|---|
| TWR | How well did the manager perform, ignoring the timing of client cash flows? | Modified-Dietz approximation; sub-period geometric linking | Manager scorecards; benchmark comparisons; advisor performance |
| MWR | What return did the client actually experience, including their own deposit and withdrawal timing? | Newton-Raphson IRR; iterates until residual < 1e-7 | Client statements; "what did I make?" answer; tax considerations |
| Cash-on-cash | Simple beginning-to-end return for the period | End MV − Begin MV − Net flows, ÷ Begin MV | Quick previews; not for client-facing reports |
Orders flow into the portfolio context as fills; the position table updates as ExecutionReports settle.
FeatureStatements, suitability summaries, performance reports — all generated through the locale-aware pipeline.
FeatureEvery position write, transaction, and price update emits an audit event. Tamper-evident by design.
Bring a sample of accounts, transactions, and prices. We'll show you exactly how Modir renders them — in your locale, with your reporting standards.