Starting My Order book Project
Introduction
My name is Rawn Kelly, and I'm a Computer Science Major attending Florida State University. Whether you've come to this blog as a recruiter or are just interested in software development, thank you for taking the time to read through a bit of my journey. I was born and raised in Florida, but I've always loved how the internet allows people to transcend their physical location and connect. That somewhat brings me to the purpose of this blog as I document the process of building an Order book in C++.
Project Overview and Motivation
In this project, I aim to showcase my ability to develop programs requiring low latency and support for multiple trading types. I chose to build an Order Book because it provides an excellent opportunity to demonstrate these skills while tackling complex algorithms and optimization challenges. Through this project, I hope to give prospective employers insights into my technical capabilities and problem-solving approach.
Initial Steps
To lay the groundwork for the Order Book, I have completed the following initial steps:
1.Set up version control by creating a GitHub repository for the project.
2.Defined the basic project structure, starting with the Orderbook.cpp file.
3.Created essential data types and structures:
- Enums for OrderType (GoodTllCancelled, FillAndKill) and Side (Buy, Sell).
- GoodTllCancelled: The order stays active until it is filled or canceled.
- FillAndKill: The order must be filled immediately or it will be canceled.
- Type aliases for Price, Quantity, and OrderId.
- LevelInfo struct to represent price and quantity at each order book level.
- OrderbookLevelInfos class to manage bids (buy orders) and asks (sell orders).
4.Implemented the OrderbookLevelInfos class with methods to get bids and asks.
Next Steps
In upcoming posts, I will delve into the core Order Book development process:
1.Implement the primary Order Book matching engine and order management functionality.
2.Extend the Order Book to handle more sophisticated order types, such as Stop Orders and Iceberg Orders, and experiment with different matching algorithms to optimize the engine.
3.Profile and optimize the code for minimal latency, employing techniques like cache optimization, lock-free data structures, and custom memory allocators.
4.Create a streamlined API for seamless interaction with the Order Book, including methods for submitting, modifying, and canceling orders and retrieving market data.
Conclusion
Thank you for joining me at the start of this journey. Stay tuned for detailed updates as I progress through building a high-performance Order Book in C++. I look forward to sharing more with you soon!