Building the trade engine framework
In this section, we will build the trade engine framework in the TradeEngine
class. This framework ties all the different components we built together – the OrderGateway
, MarketDataConsumer
, MarketOrderBook
, FeatureEngine
, PositionKeeper
, OrderManager
, RiskManager
, MarketMaker
, and LiquidityTaker
components. As a reminder of the trading engine component, we present a diagram of all the sub-components here. We have built all the sub-components; now, we will just build the trading engine framework in which these sub-components exist.
Figure 10.8 – The components of the trading engine in the client’s trading system
We will start this section by defining the data members of our class, as usual. All the source code for the basic TradeEngine
framework is in the Chapter10/trading/strategy/trade_engine.h
and Chapter10/trading/strategy/trade_engine.cpp
source files.