This repository contains code and experiments inspired by "Building Low Latency Applications with C++" by Sourav Ghosh. The goal is to understand and innovate the complexities of a trading system, focusing on high-performance and low-latency C++ code.
This project aims to implement a basic Market Publisher - Market Client trading platform. It will evolve into a more complex system, adhering to strict coding guidelines and leveraging historical computing knowledge for modern problems. The code here is written with an emphasis on:
- Data-oriented design
- Parallel computation
- Critical path optimization
- Low-latency networking
- NUMA architectures
- Cache optimization
- Exchange protocols
- High-frequency trading concepts
-
Control Flow Optimizations
- Semi-static Conditions in Low-latency C for High Frequency Trading: Better than Branch Prediction Hints
- semi-static conditions compared against [[likely]] & [[unlikely]] attributes in C++
- Link: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4553439
- Github: https://github.com/maxlucuta/semi-static-conditions
-
Kernel Bypass Optimizations
- AF_XDP & io_uring
- The Anatomy of Networking in High-Frequency Trading - Peter P. Waskiewicz
- Link: https://netdevconf.info/0x16/papers/43/pj-netdev-0x16.pdf
This project follows MISRA guidelines to ensure robust and maintainable code. Additionally, new C++ features or standards will be incorporated if they benefit the implementation. These features will be extensively documented to provide clarity and understanding.
Contributions are welcome! Feel free to fork the repository, make improvements, and submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for more details.