Flower Exchange Machine
A simplified stock exchange engine that matches buy and sell orders the way a real exchange would, built to practice the low-latency C++ techniques taught in a London Stock Exchange Group certification I earned.
The problem
The LSEG high-performance C++ certification covers mission-critical software as used in low-latency financial systems, and I wanted a concrete project to apply that beyond the coursework: a matching engine that behaves like the price-time priority logic a real exchange runs.
The approach
Built solo in C++17: buy and sell orders are read from a CSV file and matched on price-time priority using a map<double, deque<Order>> per side, with orders at the same price level matched FIFO via the deque. The engine tracks New, partial-fill, fill, and reject execution states and outputs execution reports for the batch of processed orders.
What I learned
Choosing the map-of-deques structure forced a closer look at the time/space tradeoffs behind order-book data structures than a typical coursework exercise would, since it directly determines how cheaply you can find the best price and preserve FIFO order within it.