Pre-Trade Risk to Real-Time P&L

The synchronous risk gate, the position keeper, and mark-to-market on one order path

Pre-Trade Risk to Real-Time P&L The synchronous risk gate, the position keeper, and mark-to-market on one order path Single writer per account Order In · new / cancel · Architecture component Order In new / cancel Pre-Trade Risk · limits · buying power · Single writer per account · fail closed Pre-Trade Risk limits · buying power fail closed Reservation Ledger · money in flight · Single writer per account Reservation Ledger money in flight Reject · on breach · Architecture component Reject on breach Matching / Venue · route + fill · Architecture component Matching / Venue route + fill Position Keeper · net qty · avg cost · Single writer per account Position Keeper net qty · avg cost Mark-to-Market · mark price · Architecture component Mark-to-Market mark price Market Data · top of book · Architecture component Market Data top of book P&L · realized + unrealized · Architecture component P&L realized + unrealized submit reserve fail closed accept fills value Legend External Security Database Backend

The gate

  • • Synchronous, on the critical path
  • • Cheapest checks first, bail early
  • • Fail closed on any uncertainty

Bookkeeping

  • • Buying power reserved at accept
  • • Fills fold into avg cost
  • • Snapshot + delta for fast recovery

Consistency

  • • One sequenced writer per account
  • • Shard accounts to scale out
  • • Marks feed unrealized P&L back