Skip to content

maddox-214/limit-order-book-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก Limit Order Book Simulator

A high-performance C++17 limit order book (LOB) simulator for benchmarking market and limit order execution strategies under synthetic high-frequency trading (HFT) conditions.


๐Ÿš€ Features

  • ๐Ÿ“ˆ Real-time Matching Engine
    Handles market and limit orders using price-time priority.

  • โšก 100K+ Orders per Second
    Optimized using STL containers, preallocated memory pools, and minimal heap allocation.

  • ๐Ÿงช Robust Order Flow Simulation
    Simulates realistic order traffic across 1M+ orders with configurable intensity.

  • ๐Ÿ“Š Benchmarking Support
    Measures throughput and latency for performance profiling.

  • ๐Ÿง  Clean Systems Design
    Modular codebase with separation of concerns: OrderBook, Simulator, MemoryPool.


๐Ÿ› ๏ธ Technologies

  • Language: C++17
  • Build System: CMake
  • Standard Library: STL (priority_queue, map, etc.)

๐Ÿ”ง Building and Running

Requirements:

  • CMake 3.10+
  • C++17-compatible compiler (MSVC, g++, clang++)

Build

mkdir build
cd build
cmake ..
cmake --build . --config Release

./LOB_Simulator.exe 1000000 2000000


๐Ÿ“ˆ Sample Benchmark Output
Processing 1,000,000 limit orders...
Processing 2,000,000 market orders...
Total matched orders: 1,973,420
Average latency: 4.3 ยตs
Throughput: 112,000 orders/sec

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published