Finance Theory — Market Micro Structure — Bid Ask Spread

Yutong Xie
Analytics Vidhya
Published in
5 min readDec 6, 2020

In this article, I will try to explain one big cost of trading — big ask bounce and how this affect trading decisions and profitability.

Limit Order Book

To know bid-ask spread we need to know bids and asks. To know bids and asks we need to know limit orders and limit order books. US stock exchanges organize limit order books (and you can find more info here). You can find information about 3 basic types of orders (market order, stop order, and limit order) here. Limit order book are built by exchanges to organize orders placed by traders. The orders are split into buy orders and sell orders and are ranked such that better priced orders are ranked higher (first) and earlier orders are ranked higher (second). Well, by “better priced” I mean a very expensive buying order and a very cheap selling order.

Long story short, in all the algorithm trading articles we see, people usually assume that they can buy at a closing price and sell at another closing price. To ensure your trade can be filled at the assumed closing price, you will have to place a limit order and get ranked in a limit order book. However, limit order does not necessarily get filled. Here’s why.

Take a look at the limit order book of Bitcoin/USD below. The numbers on the left (green shaded side) are buying orders and the orders on the right (red shaded side) selling orders. The price specified in a buying order is called “bid”. The price specified in an asking order is called “ask”.

https://www.reddit.com/r/CryptoCurrency/comments/85akqm/guys_what_does_this_bitcoin_order_book_at/

When you submit a limit buy order of $7,500 to this order book, your order will be ranked second because there is already a $7,500 order that came earlier but you are still willing to buy at the highest price on the book. However, if you look at the asking side, you will find that the lowest price people are willing to buy at is $100 higher, at $7,600. So your order will not get filled unless there is someone willing to sell at $7,500. I think you get the point: in order to sell at your desired price, there must be someone willing to buy at your desired price.

All in all, the market prices we observe every minute or second is just a most recently filled bid price or a most recently filled ask price. You don’t necessarily get the price we observe, you get the bid or the ask depending on the direction of trading.

So How to Ensure My Orders Get Filled?

To ensure your trade can be filled, you will have to place a market order, or a bid order that is higher than or equal to $7,600 because that’s the price people are willing to sell at. A market buy order will just take the best asking order for you. That is, the $7,600 order.

That will take away $100 of profit for each BTC you trade? Which is about 1.3%? Not just that. When you sell here, you have to sell at the bid. That will take away another $100. So another 1.3%. In total, your trading cost is 2.6% when you trade here with a bid-ask spread of $100.

How Big Can This Be?

I actually think 2.6% is very big because if your algorithm has a high turnover, e.g. trades more than 5 times in a day, the 5 trades on average has to earn more than 2.6% for your strategy to be profitable. If your strategy focuses on small stocks or cheap cryptocurrencies, then the impact will be huge. For example, ADTN is a Russell 2000 stock. (Russell 2000 is composed of the 1001st to the 3000th stocks in their market capitalization ranking. So these are pretty small stocks.)

The bid ask spread is about $1, which is 7% of the current ask. If you buy, you have to buy at $14.74. If the stock does not move and you decide to cut the position, you have to sell at $13.71. You are losing $1 without the price even moving!

What Can be Done?

There are two things can be done as a retail investor when bid ask spread exist— avoid it or take advantage of it.

To avoid the cost of it, try to trade stocks or build your algorithm with stocks that have large market caps or trading volumes. These kind of instruments usually has only 1 cent of bid ask spread because a lot of people are trading. When you are building an algorithm that involves long-short positions of many different securities, you need to be extra careful about this because usually this cost won’t show up in a back test.

To take advantage of it, people can build algorithms that takes profit by filling the gap (upcoming articles). In a confused market, we can actually place a bid order that is slightly higher than the existing bid and an ask order that is slightly lower than the current ask. If there is anyone placing market orders, our orders will be filled. In that sense, this algorithm acts as a “market maker”.

That’s all for this one. I hope this article helps with your trading and your investing. Bid-ask spread is important, but there are also other important topics about market microstructure. More articles about this will come if you like this one.

Thank you!

--

--