Here's the corrected version with improved formatting and LaTeX support:


Inspiration

Modern algorithmic trading platforms are often inaccessible, expensive, or too complex for newcomers. I wanted a fast, hands-on way to:

  • Learn market microstructure
  • Test quantitative ideas
  • Validate trading strategies
    without waiting for real market data.

I built a compact, realistic trading simulator that behaves like a simplified exchange but is intuitive enough to experiment with in minutes.


What It Does

This project simulates a live market environment with:

  • A C++ matching engine that processes orders like a real exchange
  • A Python strategy layer to test algorithms
  • A WebSocket bridge for real-time updates
  • A simple UI to visualize trades, book updates, and P&L

It's a plug-and-play sandbox for experimenting with quant ideas quickly.


How We Built It

  1. Built a lightweight C++ limit-order matching engine
  2. Connected it to a Node.js WebSocket backend
  3. Added a Python client so strategies can place orders automatically
  4. Designed a minimal frontend to display live market state
  5. Integrated everything into a single flow:

$$ \text{Strategy} \rightarrow \text{Engine} \rightarrow \text{Execution} \rightarrow \text{Analytics} $$


What We Learned

  • How real exchanges match orders using price-time priority
  • Challenges of synchronizing multiple components in real time
  • How to design low-latency communication between C++, Python, and JavaScript
  • The importance of reproducibility and clean architecture in simulation systems

Challenges We Faced

  • Keeping communication fast and consistent across different languages
  • Designing a simple but realistic order book structure
  • Ensuring system stability as multiple components communicate simultaneously
  • Balancing performance with ease of development during the hackathon

Key Features:

  • Realistic order book dynamics with $bid$ and $ask$ spreads
  • Portfolio P&L tracking: $PnL = \sum (P_{exit} - P_{entry}) \times Q$
  • Latency measurement between components
  • Reproducible simulation seeds for backtesting

Technical Stack: $$ \text{C++ (Engine)} \leftrightarrow \text{Node.js (Bridge)} \leftrightarrow \text{Python/JS (Clients)} $$

Built With

Share this project:

Updates