Transcript Rajiv Sethi: Order execution

00:00 In this video we’ll see how a sequence of ten orders is processed in a continuous double auction market.

00:09 Suppose the first order is an order to sell 200 shares at 40.52. Now, since the order book is empty to begin with this order just enters on the ask side of the order book, as you see here. In the second period we have an order to sell 200 shares at 44.09. This also enters the order book on the ask side and it enters below the original order because the ask price is higher. In the third period there’s no orders or no change in the book. In the fourth period there’s an order to buy 400 shares at 43.69. Now here you have a compatible order for 200 shares available at 40.52. So there’ll be a trade at this point and 200 shares will change hands at 40.52. But the buyer in this period wants 400, so there’s an unfilled portion of 200 shares and this will enter the bid side at 43.69, as you see here. In period five there’s an order to buy 100 shares at 41.31. This will enter on the bid side at the bottom. In period six there’s an order to sell 100 shares at 51.93. This will enter on the ask side at the bottom. In period seven an order to sell 100 shares at 47.00. This will also enter on the ask side but it will be sandwiched in between the orders that are there at the moment. Now in period eight there’s an order to buy 300 shares at 49.66. Here compatible orders exist at two different prices. There will be two separate trades and the top two entries on the ask side will disappear as you see over here. In period nine an order to sell 400 at 54.02 enters the ask side. And finally in period ten an order to sell 400 at 48.73 enters the ask side but at the top as you see here.

01:45 Now, let’s think about the market data that we’ve generated. We started off with a bunch of orders, one in every period except for the third period. And here the first column tells you the period in which the order arrives, the second column tells you whether it’s a buy or a sell order where zero stands for sell and one for buy, the third column is the price, the fourth is the quantity, and the fifth column is the traded type, in this case since there are only liquidity traders the trader type is just one.

02:11 And there were three transactions; one in period four and two in period eight and here again you see the prices and quantities at which the trades took place. And in the last column here you see the counterparties, so the person who placed an order in period four traded with the one who placed an order in the first period, the person who placed the order in period eight traded with two separate counterparties who placed their orders in periods two and seven respectively. Total volume as you can see is 500.

02:37 There were three trades. The average price was 43.24. Price volatility, which is the standard deviation of prices, is 2.76. 45% of orders that were placed traded within the first ten periods and the surplus averaged over all traders who placed an order was 0.92. The surplus is just the difference between the price that a trader ends up paying or receiving and the price that they would have been willing to accept or pay. And the mean wait time conditional on an execution of an order is 1.9. So for those individuals whose orders were executed, some were executed right away and some had to wait, and the average wait time was 1.9 periods.