Originally published by Rivkin Securities
Every now and then we post an educational blog related to trading. In this article, we are going to cover the basics of making a stock market trade. Although seemingly simple, there are some important things to watch out for when placing an order. This article will explain how to read the market depth, how to place a market order, and finally how to place a limit order.
To understand the different order types available, one must first understand how to read the market depth. Put simply, the market depth is a list of willing buyers and the price they are willing to buy at and a list of willing sellers and the price they are willing to sell at. Table 1, below, shows a sample market depth for a hypothetical stock. The columns coloured green are the bids (buyers) and the columns shaded red are the offers (sellers). Looking at the first green row, you would read this as follows “there are people willing to buy 100 shares at $25.30”. On the other side, in the lowest red column, you would read this as “there are people willing to sell 70 shares at $25.40”. In the current state, the highest bid is below the lowest offer so no trade will take place. The gap between the highest bid and the lowest offer is known as the ‘spread’.
Table 1: Market Depth
In this example, the spread is only $0.10 but for illiquid stocks the spread can be much larger. Table 2 shows a market depth with a much larger spread.
Table 2: Market Depth with Large Spread
The example in table 2 shows a stock with a spread of $0.90. Compared to a lower spread, a large spread will generally result in paying a higher price when buying and/or receiving a lower price when selling. Highly liquid stocks are therefore preferable from the point of view of costs of trading.
For a trade to occur, there must be at least one buyer willing to pay at least the amount of the lowest offer or one seller willing to sell at the highest bid. Table 3 shows how this might occur.
Table 3: Trade Occurs
Now a new buyer has come in and submitted an order to buy 70 shares at a price of $25.40. There happens to be a seller at this same price so the buyer and seller can be matched together to produce a trade. Because both the buyer and seller wish to transact with 70 shares, there are no shares left over. When viewing a market depth during trading hours, the situation shown in Table 2 will never be seen because the trade will occur instantly. After the trade occurs, the market depth will look like Table 4.
Table 4: Post-trade depth
After this trade occurs, all of the shares offered at $25.40 and the shares bid at $25.40 have disappeared because they have traded. Now the highest bid is $25.30 and the lowest offer is $25.50. This means that a new trader could submit a new bid at $25.40 or a new offer at $25.40 without a trade occurring. Going back to Table 3, you might now be wondering, what happens if the bid and offer volumes don’t match? Well, Table 5 shows what would happen in that situation.
Table 5: Matching bid and offer (left hand side) and market depth post-trade (right hand side)
In this case, the buyer is only willing to buy 40 shares at $25.40 but the seller is wishing to sell 70 shares. A trade can still occur but the seller will be left with some unsold shares (70 - 40 = 30) so the post-trade market depth will still show a seller at $25.40 with 30 shares to sell. The buyer has bought all 40 shares that he/she wanted so there is no longer a buyer at $25.40.
So what does this mean for someone wanting to buy shares? Well there are two main types of order that you can use to trade shares, a market order or a limit order. Understanding these order types is easiest using an example. Continuing with our market depth in table 1, a market buy order will buy stock at the best available price, in this case $25.40 (the lowest offer) but because there are only 70 shares offered at this price a buyer wanting more shares would need more offers. In the case of a market order, the system will fill as many shares as possible at the lowest offer, and once this is gone, continue filling at the next best offer. Table 6 illustrates this situation:
Table 6: Market Order
In table 6, a buyer submits an order for 200 shares at market. The best offer is $25.40 but there are only 70 shares available at this price. As explained before, the market order will fill 70 shares at this price. At this point, there are still 130 shares to be filled for this order. The system will then go to the next best price, $25.50 and fill the 85 shares offered there. Now a total of 155 shares have been filled with 45 remaining. With a large seller at $25.60, the remaining shares will trade at this price. From the point of view of the buyer, Table 7 (below) shows the result of the trade.
Table 7: Summary result from market order
As shown in the table, the average buy price for this trade was $25.49, calculated from the weighted average of the three buy prices. This highlights a risk associated with market orders. The system will continue paying higher prices until the order is filled so if the order is particularly large, or the liquidity is very low, the buyer could pay a much higher price than expected.
The second order type, a limit order, can eliminate the risks associated with a market order. A limit order differs from a market order in that it specifies the maximum price that a buyer is willing to pay (or the minimum price that a seller is willing to receive). Sticking with the example above, lets imagine that our buyer still wants to buy 200 shares but this time he/she submits a limit buy order at a price of $25.50. Table 8 shows this situation.
Table 8: Limit Buy Order
In this case, the buyer will pay $25.40 for the first 70 shares and $25.50 for the next 85 shares. Although there are still 45 shares to fill, no further trades will occur because the buyer specified a maximum price of $25.50 and there are no more offers at or below this price. Table 9 shows the market depth after this trade takes place.
Table 9: Market Depth Post-Limit Trade
The remaining 45 shares from the buyer will now be sitting in the market depth at the limit price ($25.50) and the offers at $25.40 and $25.50 will no longer be there as they have already been filled. The buyer will now have to wait for a seller to enter the market at a price equal to or lower than the $25.50 limit price.
The above examples look at the trade from the point of view of a buyer. Exactly the same principles and rules apply when selling. Investors should be wary of using market orders, especially when liquidity is thin. Limit orders are recommended when you want to be sure that you won’t trade at a worse price than you are willing to accept although limit orders come with the risk that your trade won’t be filled.