This project is a market simulation that implements an order book with agents that can trade. The agents will trade using procedurally generated data. The simulation will be extended to include various market conditions such as bullish and bearish trends.
- Order Book: An order book that supports adding, cancelling and modifying Limit Orders, and Market orders with a matching algorithm.
- Procedural Agents: Can run simulated agent orders on exchange for any number of days.
- Market Conditions: (Upcoming) Simulations of different market conditions such as bullish and bearish trends.
-
Implement Order Book
-
Implement Limit Orders
-
Implement Market Orders
-
Implement Matching Algorithm
-
Implement Cancel Orders
-
Implement Modify Orders
-
Make sure there are no memory leaks (make valgrind)
-
Stress test the order book (make stress_test)
-
-
Implement Agents
-
Implement Agents that can place orders in the market
-
Implement Agents that can cancel orders in the market
-
Implement Agents that can modify orders in the market
-
-
Implement Market Conditions
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/ismaeelbashir03/OrderBookSimulation.git cd OrderBookSimulation
-
Install dependencies: Ensure you have
g++
installed. You can install it using the following command:sudo apt-get install g++
(Optional) Ensure you have
valgrind
installed. You can install it using the following command:sudo apt-get install valgrind
-
Build the project and run it:
To run the order book (small test in main.cpp):
make orderbook
To run the agent simulation (simulates orders with procedural generation):
make agent
To run the stress test (generates 1 million random orders and tests the order book):
make stress_test
To run the valgrind test (checks for memory leaks):
make valgrind
To run leak for mac (checks for memory leaks):
make leak
To run tests (unit tests):
make tests