Reacting to executions and managing positions, PnLs, and risk
We need to build a few basic building blocks that will build and support our trading strategies. We discussed the need for these components in Chapter, Designing Our Trading Ecosystem, in the Designing a framework for low-latency C++ trading algorithms section. We have already implemented a major component – the limit order book – but in this section, we will build the remaining components we need, namely the following:
- A
FeatureEngine
, which will be used to compute simple and complex features/signals that drive the trading strategy decisions - A
PositionKeeper
, which will receive executions and compute important measures such as position, PnLs, traded volumes, and more - An
OrderManager
, which will be used by the strategies to send orders, manage them, and update these orders when there are updates - A
RiskManager
to compute and check the market risk that a trading strategy is attempting to take...