Argus Risk
A local simulator for a multi-currency risk platform, where every number on the dashboard shows where it came from and how old it is.
- .NET 8
- Kafka
- PostgreSQL
- SignalR
- 5 currencies
- 4 services
- 126 .NET tests
- 1 command to run it
A total doesn’t say how old it is.
I work on pricing and risk systems, and I wanted to build a small version of that world end to end, with a front end that makes it easy to see. Most risk dashboards show a portfolio’s value, but not how old it is, which feed it came from, or whether the system is keeping up. Argus is a simulator: its prices, FX rates and trades are generated, and it runs on your machine.
Two users, on paper.
The spec names the simulated user, a risk or portfolio manager, and the real audience:
“hiring managers and engineers at banks, hedge funds, and trading firms”
Show the number with its history.
- Every change is an event. Replay them and you can see any position at any point in time.
- Freshness sits next to the value. If a feed stalls, you see what failed and how old the number is.
- The maths is plain functions. FIFO cost basis, P&L and Value at Risk: same inputs, same answer.
- Check the answer. A reconciliation run replays history and compares it with the live state.
Unrealised P&L (USD)
Illustrative positions in Argus’s own shapes. Argus counts a price older than 5 seconds as stale.
- AAPL
- From
- A price tick on market-data.pricesAAPL at 182.40 USD
- Age
- 1 s
- HSBA.L
- From
- A price tick on market-data.pricesHSBA.L at 6.52 GBPConverted at GBP/USD 1.27
- Age
- 3 s
- TTE.PA
- From
- A price tick on market-data.pricesTTE.PA at 61.85 EURConverted at EUR/USD 1.08
- Age
- 7 sStale
Four services and a stream.
Two simulators publish prices, FX rates and trades to Kafka (Redpanda locally). The risk engine publishes a snapshot every second, and SignalR pushes it to a Next.js dashboard. Marten keeps position events in PostgreSQL, so history replays at up to 60 times speed.
Runs locally with one command.
One Docker command runs the whole stack on your machine. I designed it for under 500 ms from a price change to the dashboard.
What’s next
- Measure the latency. Add a benchmark and publish the result.
- Make it easier to see. Add a recorded replay or a hosted read-only demo.
- Stress testing. Shock a currency or a sector and watch the portfolio react.