November 2019
Beginner
394 pages
10h 31m
English
The goal of the TestTradingSimulation class is to create the full trading system by gathering all the prior critical components together.
This class checks whether, for a given input, we have the expected output. Additionally, we will test whether the PnL of the trading strategy has been updated accordingly.
We will first need to create all the deques representing the communication channels within the trading systems:
import unittest from chapter7.LiquidityProvider import LiquidityProvider from chapter7.TradingStrategy import TradingStrategy from chapter7.MarketSimulator import MarketSimulator from chapter7.OrderManager import OrderManager from chapter7.OrderBook import OrderBook from collections import deque