YoctoTrader: a tiny event-driven simulated trading engine (Java, Disruptor)
A toy project that shows the flow, not the money. This is for learning about event-driven design and latency. Not trading advice! What this is YoctoTrader is a compact, readable pipeline: 1 2 3 Simulated Feed ──> Disruptor Ring ──> Strategy ──> Risk Gate ──> Order Publisher │ │ └────────────── Latency Recorder <────────┘ Feed: Gaussian random-walk prices (no I/O). Disruptor: single-producer ring buffer; reuses event objects to avoid GC churn. Strategy: fast/slow moving-average crossover. Risk Gate: simple position cap and order-rate throttle. Order Publisher: prints orders (placeholder for an OMS/gateway). Latency: end-to-end nanoseconds, summarized with HdrHistogram. The code is intentionally minimal so you can profile, tweak, and see cause↔effect quickly. ...