The Order Book Workout
- 05:11
A worked example showing how the order books enables a large purchase of securities to be made.
Transcript
This workout helps us to understand how order books work and their impact on purchases and sales of financial instruments. The question notes that a trader is looking to build a long position i.e. to buy a number of shares and entered into a market with an order to buy 2,500 shares. Unfortunately, an error was made and that number was input as 25,000 shares. And the question asks us to consider the average purchase price of those 25,000 shares and also the new best bid-ask price and volume depending on which side is affected. So here we have our order book and we have on the left hand side the bid side. And this is the price at which a trader is happy to buy these shares, both the size and the price. And therefore for a counterparty, this is the sell side. This is if I wanted to sell those shares. And I obviously get the best price by going with the best bid for the top price. We're looking to buy shares, so therefore we need the ask side of the table. And therefore, at the top, the best ask is the lowest price. Now you can see, if you look at the top there, were up to 2,840 shares available at a price of 87.60. So if we wanted to buy 2,500, we would've been within that range. We've been able to buy them all at 87.60. However, at 25,000 shares, we're gonna have to work down the table and buy all of the first five lines, which gets us to 24,270. And some of the sixth line, you can see at the very bottom that Excel gives you a total of 27,385. So we're going to need to buy some of the very sixth line.
So we'll start by copying the ask price from the best ask all the way down, and also the volume available. And we'll copy those all the way down to the lowest level. Now, how many do we need to buy? We need to calculate this. We can see that we need to buy the first five in full because that's lower than our 25,000, and we'll need to buy some of the very bottom line.
So we're gonna copy these all the way down in full. And then the very bottom line is going to simply be the difference between 25,000 and the sum of all the items above.
And that gives us a balancing figure of 730 that we need from the bottom and highest price. We then calculate an aggregated amount of running total or cumulative total.
We'll simply take that as the total from the previous purchase, plus the amount purchased for this purchase.
I'll copy the formula down and you can see in total that gives us 25,000 shares and cumulative amount purchase. We can then work out the total price time size, which is the ask price multiplied by the amount purchased, and then copy those all the way down. So then instead of 2,500 times 87.6, we've had to buy 25,000 times all of these much higher amounts. So we can now calculate our total purchase price for all of those 25,000 shares.
I'll just put the formulas on the right hand side.
This then enables us to calculate the average price that we have paid per share, which is the total purchase price divided by 25,000 shares purchased 87.6, and that compares to the 87.60, which was expected. So obviously a little bit higher as we've had to work out, work our way down the order book.
And so the best ask, the best ask price at the end of this transaction, assuming that all of these have been purchased, is basically the 87.66. That's the next one on offer. So the best ask price is 87.66. And how many shares would be available theoretically, 3155 minus the amounts that we have purchased, i.e. 730.