investing

How The Stock Exchange Works

May 1st, 2014

Stay up to date

This blog post was originally published on the MoneyGeek.ca blog by Jin Choi. The website no longer exists, but Jin has graciously allowed us to re-publish his research for the benefit of future investors forever.

Before we started dating each other, my wife asked me for some advice. She had a little bit of savings, and she wanted to grow it quickly. What should she invest in?

I hadn't set up MoneyGeek back then, and she wasn't going to invest a large sum, so I told her about a penny stock I particularly liked.

Next time we met, she told me that she bought the stock. However, she had a question. Why did the price go up 30% just as she bought?

I slapped my forehead.

Not knowing how the stock market operated, she paid much more than she should have for the shares. In this post, I'll explain how the stock exchange works.

How Limit Orders Work

Let's say you want to place an order for XYZ shares. If you have a brokerage account like Questrade, you can do that by logging into the web platform, and then clicking on the buy/sell button. You also have the option of calling your broker.

There are two types of orders.

First, there's the limit order. For this order type, you can specify the price you want to either buy or sell shares at. For example, I can say "buy me 100 shares of XYZ at $20 per share".

Once you give that order, the broker will in turn contact the stock exchanges. I say 'exchanges' (plural) deliberately, because there has been some changes in the last few years. Traditionally, there used to be just one exchange for each stock. For example, since Royal Bank (RY) is listed in the TSX, it used to only trade in the TSX exchange. However, a number of 'Alternative Trading System' (ATS) came into being in the last few years, complicating matters. This distinction becomes important in a future post.

Nowadays, upon receiving your order, the broker will send in that order to one or more of these these exchanges. The broker will say, we want to buy 100 shares of XYZ at $20 per share to satisfy our client.

Then, one of two things will happen. If someone is already offering to sell shares at $20 per share or below, your broker will trade with that someone. Once the trade is agreed, both your broker and the seller will submit their orders to an electronic settlement system. You don't technically 'own' the shares until the settlement date, which is typically a few days after you trade. However, you can consider it your own for all intents and purposes before the trade settles.

But if no one is offering to sell shares at or below $20 per share, your order gets recorded in the 'order book'. There, your order will live until it either gets filled because someone offers to sell you shares at $20, or until you cancel it.

The order book will contain many orders sent in by many investors. The highest price on a buy order is called the 'bid'. The lowest price on a sell order is called the 'ask'. For example, let's say we have the following order book.

Order TypePriceShares
Sell$11.002000
Sell$10.50500
Buy$10.25700
Buy$10.00200

The bid in this case is $10.25, and the ask in this case is $10.50.

That's how the limit order works, so let me explain the market order.

How Market Orders Work

When you send in a market buy order, you're saying, buy me shares NOW, at the best price. In the example above, since the cheapest sell order (i.e. the 'ask') is at $10.50, you'll buy shares at $10.50.

Now that you know how the stock exchange operates, let me explain what happened with my wife.

Some penny stocks don't trade very much at all. In fact, some of them may trade only a couple of times a month. This happens because these companies are so small, that even the smallest funds are not interested in the company. For example, if a fund has $5 million, and can realistically buy only $5,000 worth of stock, then even if the stock doubles, it would only mean 0.1% gain for the fund.

I on the other hand, like it as I'm really competing against "grandpas in pajamas", as I like to call them.

Anyway, because penny stocks don't trade very much at all, the gap between the bid and ask are huge. For example, I've routinely seen penny stocks where the ask is 15 cents, and the bid is 7 cents. Talk about a big gulf!

So before my wife became my wife, I told her to buy shares at the bid, thinking she'll figure out what 'bid' meant. I was wrong. She went ahead and sent in a market order, and bought shares at the ask. That's why she paid 30% more than she should have. This is the reason why I don't publish my current penny stock holdings. I fear that too many people will make the same mistake that my wife did.

So that, in a nutshell, is how stock exchanges work. Of course, if you get into the gritty details, it gets a lot more complicated than that. There are dark pools, limit on close orders, etc. But overall, the exchanges work in the way that I described in this article, and understanding it will help you make wiser decisions with your investments.

This blog post was originally published on the MoneyGeek.ca blog by Jin Choi. The website no longer exists, but Jin has graciously allowed us to re-publish his research for the benefit of future investors forever.