Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
|
#include "pch.h"
#include "../Orderbook.cpp"
#include "../Orderbook.h"
#include "../OrderbookLevelInfos.h"
#include "../OrderbookLevelInfos.cpp"
#include "../Order.h"
#include "../Order.cpp"
Classes | |
struct | Information |
Holds information about an action to be performed on the order book. More... | |
struct | Result |
Holds expected results for order book counts used for assertions. More... | |
class | InputHandler |
Parses test input files to extract actions and expected results. More... | |
class | OrderbookTestsFixture |
Test fixture for Orderbook tests, providing setup for test files and paths. More... | |
Typedefs | |
using | Informations = std::vector< Information > |
using | Results = std::vector< Result > |
Enumerations | |
enum class | ActionType { Add , Cancel , Modify } |
Defines the types of actions that can be performed on the order book. More... | |
Functions | |
TEST_P (OrderbookTestsFixture, OrderbookTestSuite) | |
Test case for the Orderbook functionality. More... | |
INSTANTIATE_TEST_CASE_P (Tests, OrderbookTestsFixture, googletest::ValuesIn({ "Match_GoodTillCancel.txt", "Match_FillAndKill.txt", "Match_FillOrKill_Hit.txt", "Match_FillOrKill_Miss.txt", "Cancel_Success.txt", "Modify_Side.txt", "Match_Market.txt" })) | |
Instantiates test cases for OrderbookTestsFixture using predefined test files. More... | |
using Informations = std::vector<Information> |
|
strong |
INSTANTIATE_TEST_CASE_P | ( | Tests | , |
OrderbookTestsFixture | , | ||
googletest::ValuesIn({ "Match_GoodTillCancel.txt", "Match_FillAndKill.txt", "Match_FillOrKill_Hit.txt", "Match_FillOrKill_Miss.txt", "Cancel_Success.txt", "Modify_Side.txt", "Match_Market.txt" }) | |||
) |
Instantiates test cases for OrderbookTestsFixture using predefined test files.
TEST_P | ( | OrderbookTestsFixture | , |
OrderbookTestSuite | |||
) |