MBO PCAP Parser is a high-performance C++ application designed to parse PCAP files from the Exchange (current implementation is based on the CBOE Future Exchange), reconstruct MBO order books, and can be used to identify arbitrage opportunities and trading signals. It is optimized for macOS and Unix-like systems and uses CMake for build management.
- Parses PCAP data captured from the exchange network.
- Reconstructs MBO (L3) order books.
- BBO Tracking.
- Order book visualizer.
- Arbitrage finder (still WIP).
- Can exports reconstructed data for further analysis.
- Highly optimized for performance with
-O3and-march=nativecompiler flags.
- macOS or Unix-like system.
- GCC or Clang (optional).
- libpcap (PCAP library for parsing packet data).
- CMake (minimum version 3.14).
- BOOST Libraries (version 1.85+)
-
Install GCC or Clang.
- GCC example:
brew install gcc
- Clang example (optional):
brew install llvm
- GCC example:
-
Install
CMake:brew install cmake
-
Install
libpcap(if not already installed):brew install libpcap
-
Install Boost C++ Libraries (https://www.boost.org/):
brew install boost
- Clone the repository
git clone https://github.com/your-username/MBOOrderBookParser.git
cd MBOOrderBookParser- Create a build directory:
mkdir build
cd build- Configure the project with CMake:
cmake ..- Build the project:
cmake --build buildAfter a successful build, the executable will be generated in the build directory. Run the following line to get the program usage:
build/MBOOrderBookParser --helpMBOOrderBookParser/
├── build/ Build directory (generated after CMake)
├── include/
│ ├── CBOEPcapParser.hpp # Pcap Parser
│ ├── cfepitch.h # CFE pitch specs
│ ├── Config.hpp # Configuration of program options
│ ├── cxxopts.hpp # Program options parser lib
│ ├── DataExporter.hpp # Exporter of data (csv, bin, etc)
│ ├── MessageInfo.hpp # Information struct
│ ├── Order.hpp # Individual order class
│ ├── OrderBook.hpp # Individual order book class
│ ├── OrderBookManager.hpp # Order books manager class
│ ├── OrderStore.hpp # Order objects store class
│ ├── StopWatch.hpp # Timer
│ ├── Symbol.hpp # Ticker symbol struct
│ └── ThreadPool.hpp # Thread pool class (not being used in current implementation)
├── ref/
│ └── CFE Multicast PITCH Spec v1.2.8 2024-08-09.pdf # CFE Pitch specs
├── src/
│ ├── CBOEPcapParser.cpp # Pcap Parser implementation
│ ├── DataExporter.cpp # Exporter of data (csv, bin, etc) implementation
│ ├── main.cpp # Program entry point
│ ├── Order.cpp # Individual order class implementation
│ ├── OrderBook.cpp # Individual order book class implementation
│ ├── OrderBookManager.cpp # Order books manager class implementation
│ ├── OrderStore.cpp # Order objects store class implementation
│ ├── StopWatch.cpp # Timer implementation
│ └── ThreadPool.cpp # Thread pool class implementation