Design a Real Time Risk Aggregator Across Thousands of Strategies

Last updated: November 29, 2026

Quick Overview

Design a service that consumes fills and market prices for thousands of trading strategies and publishes up-to-date exposures, P&L and limit breaches by strategy, book, sector and firm within about a second.

D. E. Shaw
System Design
Software Engineer
D. E. Shaw
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a service that consumes fills and market prices for thousands of trading strategies and publishes up-to-date exposures, P&L and limit breaches by strategy, book, sector and firm within about a second.

Fits the system design round for D. E. Shaw software developers working on front office platforms, where many systematic and discretionary books share risk limits. The interviewer looks for a correct streaming data model, hierarchical aggregation that is incremental rather than recomputed, and a clear story for correctness, recovery and limit enforcement.

What the Interviewer Expects
  • Separates position state from price state and recomputes valuations incrementally
  • Defines the aggregation hierarchy and updates it with deltas
  • Partitions by instrument or strategy with a justified choice
  • Handles replay, exactly-once effects and reconciliation against end-of-day books
  • Explains how limit breaches reach traders and pre-trade checks with bounded latency
Key Topics to Cover
stream processing
incremental aggregation
event sourcing
risk limits
partitioning
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you add a scenario such as a 10 percent equity sell-off across all books?
  • How do you handle derivatives whose sensitivities need a pricing model call?
  • What happens if the price feed for one exchange stalls for 30 seconds?
  • How would you prove that the real-time totals agree with the end-of-day accounting system?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: ingest fills (strategy, instrument, signed qty, price) and price ticks for about 100k instruments; maintain positions; compute market value, delta-style exposure, intraday P&L; aggregate u...

High-Level Design

Fills and prices land on a durable log (Kafka style) partitioned by instrument. Position workers own a partition of instruments: they hold position[strategy, instrument] and the latest price, so a t...


Submit Your Answer
Markdown supported

Related Questions