Back to Projects

tradingAI: High-Performance Trading Engine

Problem

Standard retail trading platforms often suffer from "jitter" and "execution lag" because they are not designed for high-throughput, low-latency data processing. For a research lab, the challenge is to build an engine capable of handling thousands of messages per second with deterministic latency.

Architecture

Architecture Overview: View Diagram

  • Ingress Gateway: A high-speed normalization layer for WebSockets and FIX protocols.
  • Signal Processing: A parallelized calculation engine that computes alpha signals across multiple assets simultaneously.
  • Risk & Gatekeeper: A non-blocking risk-management layer that performs pre-trade checks in sub-millisecond timeframes.
  • Order Manager: A stateful execution engine that handles order life-cycles and state persistence.

Design Trade-offs

  • Concurrency Model: We chose a thread-per-core approach for the Signal Engine to maximize L1/L2 cache hits, trading off slightly higher complexity for lower tail latency.
  • Persistence: We utilize a specialized Time Series Database (TSDB) for history, while maintaining a hot-cache in memory for active positions.

Tech Stack: Java, Spring Boot, Netty, Kafka, TimescaleDB, Clickhouse.