overview / problem

The project explores how stateful backend systems behave when strategy decisions, risk checks, simulated execution, persistence, streaming, and replay all have to agree on event order.

what I built

Engine independence, deterministic replay, state transitions, risk limits, execution simulation, persistence, streaming, Redis deduplication, and adapter separation.

architecture

Market events → Strategy engine → Risk engine → Execution simulation → Portfolio state → PostgreSQL / Redis → FastAPI → React dashboard

interesting decisions

Deterministic replay

Event order and state transitions are designed to be reproducible so behavior can be inspected after a simulation run.

Adapter separation

Historical data, execution simulation, persistence, and dashboard APIs are separated so simulated market data does not imply live brokerage connectivity.

Qualified benchmark

The repository documents roughly 97,000 events/second on an Apple M-series machine for the pure in-process Python event path without database writes.

limitations