LiquidityProvider class

The LiquidityProvider class is the simplest of all the others. The goal of this component is to generate liquidities. Since we randomly generate liquidities, we just need to test whether the first liquidity that is sent by the LiquidityProvider class is well formed. We will create the generate_random_order function, which will randomly pick a side, a price, a quantity, and an action associated to this order. We will have three kinds of actions: create a new order, amend an order, and cancel an order. Since we are going to create a full trading system, we will also want to test the full system by inserting the order manually. Hence, this LiquidityProvider component will have a way to insert manual orders into the system. ...

Get Learn Algorithmic Trading now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.