Latest / How Canadian Markets Work / The Life of an Order Explained: What Happens After You Hit Buy? | Canadian Investing
Transcript
- 0:00The $80 price tag on your trading screen is,
- 0:03well, it's basically an illusion. Yeah, it really
- 0:06is. It's just this historical snapshot of a past
- 0:09reality. And the exact moment you try to touch
- 0:12it, you know it changes. So welcome to today's
- 0:15Deep Dive. We are opening up a really fascinating
- 0:18stack of notes on the hidden inner workings of
- 0:20Canadian financial markets. Which is, that's
- 0:23a topic a lot of people think they understand,
- 0:25but the mechanics are wild. Completely wild.
- 0:27And our mission today is to essentially slow
- 0:30down time for you. We are going to look at the
- 0:32exact millisecond by millisecond journey of a
- 0:35stock order. We want to uncover all that invisible
- 0:37plumbing that dictates what actually happens
- 0:41in the digital ether between the moment you press
- 0:43buy and the moment your order is actually filled.
- 0:46Right, because that journey is far more complex
- 0:48and frankly perilous than most investors realize.
- 0:52I mean, pressing that button sets off this massive
- 0:54chain reaction across multiple systems. Oh, for
- 0:57sure. You've got algorithmic routing networks,
- 0:59matching engines, all of it operating in literally
- 1:02fractions of a heartbeat. And they're constantly
- 1:04weighing these competing priorities that you
- 1:06never even see on your screen. And to really
- 1:08ground this in reality, we have to start with
- 1:10this highly relatable frustration. It's something
- 1:13almost everyone who has ever traded a stock has
- 1:16probably experienced. Oh, yeah. The four cent
- 1:18mystery. Exactly. So you look at a stock on your
- 1:21screen, the price says $80. You press buy for
- 1:25500 shares. But then a few seconds later, your
- 1:28confirmation screen pops up and it says your
- 1:30average cost was $80 and four cents. Right. Which
- 1:34is I mean, that's a $20 difference on the total
- 1:36trade. It's not going to bankrupt you, but it
- 1:37is just incredibly irritating. So OK. Let's unpack
- 1:41this. How does that happen when you are looking
- 1:43right at the $80 price tag when you clicked your
- 1:46mouse? Well, it's easy to forget that a quote
- 1:48on a screen isn't like a locked -in price. It's
- 1:50just a historical snapshot. Right. It's looking
- 1:53backward. Exactly. It's essentially a photograph
- 1:55of the market taken milliseconds ago. To really
- 1:58visualize this, we need to briefly break down
- 2:00what that quote actually represents. It's showing
- 2:03you the best bid and the best ask at that specific
- 2:07moment. Okay. So the bid is the highest price
- 2:10any buyer is currently willing to pay. And the
- 2:12ask, which is obviously what you care about when
- 2:15you are buying, is the lowest price any seller
- 2:18is currently willing to accept. Right. But that
- 2:21photograph is not a promise. And it certainly
- 2:23isn't reserved for you just because you happen
- 2:25to be looking at it on your screen. And crucially,
- 2:27depending on the data feed you are using, that
- 2:29snapshot might be surprisingly incomplete. Very
- 2:32much so. Even with a real -time feed, most retail
- 2:35platforms only show you the top. of the order
- 2:37book. They show you the best price available,
- 2:39but they do not show you the volume. Right. The
- 2:42depth is totally hidden. Yeah. So you might see
- 2:45an ask of $80, but there might only be, say,
- 2:4910 shares actually sitting on the shelf at that
- 2:51price. When you are trying to buy 500 shares,
- 2:54that missing volume data is the absolute crux
- 2:57of this whole 4 -cent mystery. Exactly. And to
- 3:00solve that mystery mathematically, we really
- 3:03have to trace your order's exact path from the
- 3:06very beginning. So, the first stage happens in
- 3:09the milliseconds right before your order even
- 3:12hits the public market. We call this the validation
- 3:14phase. I always think of this step as like an
- 3:18automated bouncer at a nightclub. That's a perfect
- 3:20way to picture it. Because before you can even
- 3:22get near the dance floor, this digital bouncer
- 3:24grabs your order and strictly enforces the house
- 3:27rules. Like, do you actually have the buying
- 3:29power in your account to cover this trade? Is
- 3:32the ticker symbol even valid or did you, you
- 3:34know, make a typo? Right. Are there any specific
- 3:36trading restrictions on your account. Exactly.
- 3:39And this all happens in microseconds, but it
- 3:42is a rigid gate. If you have miscalculated your
- 3:45cash and you try to buy more than you can afford,
- 3:48the bouncer just rejects your order instantly.
- 3:50You do not get into the club. But assuming you
- 3:52do pass the bouncer, the journey immediately
- 3:54hits a fork in the road. This is the routing
- 3:57phase. And most people just assume that if they're
- 3:59buying a Canadian stock, their order just goes
- 4:02straight to the Toronto Stock Exchange. Right.
- 4:04The TSX. Yeah. but Canada has a highly fragmented
- 4:07market structure. There are actually multiple
- 4:10alternative marketplaces and exchanges all trading
- 4:12the exact same securities simultaneously. So
- 4:15once you're past the bouncer, your order goes
- 4:18to the market. But the market isn't just one
- 4:20place. It's a whole street of clubs, and they're
- 4:23all playing the exact same music. Right. And
- 4:25your brokers' algorithms have to instantly decide
- 4:27which of those clubs to send your order to. Now
- 4:30they have a regulatory obligation to seek best
- 4:33execution for you. But whenever there are routing
- 4:36choices in finance, there are usually, well,
- 4:39structural friction points. So let's dig into
- 4:42the conflict of interest here. Because brokers
- 4:44have financial incentives to send orders to specific
- 4:47venues, right? Yes. This raises an important
- 4:49question about market plumbing. Best execution
- 4:52is not just a simple mandate to find the absolute
- 4:55lowest price. It's this nuanced balancing act.
- 4:59Regulators actually require brokers to weigh
- 5:01price, speed, the certainty that the execution
- 5:04will happen, and the overall cost of the trade.
- 5:08OK. And that last factor, the overall cost, is
- 5:11where the broker's own financial realities kind
- 5:13of collide with your trade. Wait, so how does
- 5:17that tension mechanically work behind the scenes?
- 5:19Like, how does a broker make money off routing?
- 5:22Well, it really comes down to fee structures,
- 5:24specifically the maker -taker model that a lot
- 5:27of exchanges use. So exchanges want to attract
- 5:30liquidity. They want people posting orders on
- 5:33their books. Makes sense. So they will often
- 5:35pay a rebate to the participant who makes or
- 5:38provides that liquidity, and they will charge
- 5:40a fee to the participant who takes or removes
- 5:42that liquidity. Oh, I see. So when you submit
- 5:46a market order to buy immediately, you are taking
- 5:49liquidity. Your broker has to pay a fee to the
- 5:52exchange to execute that trade but different
- 5:55exchanges charge different fees and Some even
- 5:58use inverted models where they might actually
- 6:00pay the broker a rebate for bringing that taker
- 6:02order to their venue Okay, so this means there
- 6:06is a live ongoing tug -of -war between routing
- 6:10the order to the absolute cheapest path for the
- 6:13brokers bottom line and Finding the absolute
- 6:15best execution for you the client exactly Now,
- 6:18it is heavily monitored and regulated by compliance
- 6:21departments, but that friction is literally baked
- 6:23right into the architecture of the system. Right.
- 6:26And the outcome requires algorithmic judgment,
- 6:28which inherently means that two different brokers
- 6:30might route the exact same order in slightly
- 6:33different ways. OK, so let's follow the order
- 6:36past that routing decision. The broker has navigated
- 6:39the fees. They've picked a destination. The order
- 6:42finally hits the matching engine. It arrives
- 6:45at the public order book. Here we go. And this
- 6:47is the exact moment where that initial $80 versus
- 6:51$80 .04 mystery is mathematically solved. We
- 6:55can actually look at the numbers from the sources.
- 6:57Yes. This is where theory meets the reality of
- 7:01supply and demand. So your order for 500 shares
- 7:03hits the book. The matching engine looks at the
- 7:06ask side, the sellers. It turns out there are
- 7:09exactly 200 shares being offered by sellers out
- 7:12there at exactly $80. OK. but that is the entire
- 7:16supply at that specific price point. The next
- 7:18available batch of shares, let's say there are
- 7:20300 of them just sitting there, are being offered
- 7:23by sellers who are demanding $80 .05. Okay, and
- 7:26because you submitted a market order, meaning
- 7:29you instructed the broker to prioritize speed
- 7:31and just buy the shares right now at whatever
- 7:32the going rate is, the matching engine just becomes
- 7:35this hungry machine. Right. It just wants to
- 7:38fill the order. So it eats up those 200 cheap
- 7:41shares at $80, but your order isn't satisfied.
- 7:43You still need 300 more shares. So the machine
- 7:46simply climbs up the ladder to the next available
- 7:48price on the shelf. It forces you to buy those
- 7:51remaining 300 shares at the higher price of $80
- 7:54.05. Exactly. And when you blend that mathematical
- 7:58reality together, taking 200 at $80 and 300 at
- 8:01$80 .05, your average cost comes out to exactly
- 8:05$80 .03. Ah, there it is. Yep. Add in a tiny
- 8:09bit of real -world transactional friction or
- 8:12fractional rounding within the clearing process,
- 8:14and your confirmation receipt spits out $80 .04.
- 8:17Here's where it gets really interesting. This
- 8:20reveals a core market dynamic that honestly every
- 8:23investor needs to internalize. You got a worse
- 8:26price on the second half of your order precisely
- 8:28because you bought the first half. Yes. Your
- 8:31own order consumed the available supply and actively
- 8:33moved the price against you. This is market impact.
- 8:38People tend to visualize the market as this infinite
- 8:41ocean of shares available at the quoted price,
- 8:43but it's actually a shallow pool. And when you
- 8:45jump in with a large order, you displace the
- 8:47water. That's a great analogy. Institutional
- 8:50investors actually spend millions of dollars
- 8:52on sophisticated algorithms designed entirely
- 8:55to hide their market impact. They slice massive
- 8:57orders into tiny pieces over days or even weeks.
- 9:00Right, to avoid making a splash. Exactly. Retail
- 9:03investors, on the other hand, often just click
- 9:05buy and absorb the impact all at once. Now, for
- 9:09a 500 -share order of a massive, highly liquid
- 9:11stock like a major Canadian telecom or a bank,
- 9:14market impact is just that 4 -cent annoyance.
- 9:17The pool is deep enough that your splash barely
- 9:20registers. But… But… Apply that exact same matching
- 9:24engine logic to an illiquid stock, and the outcome
- 9:27is absolutely devastating. Yeah, this takes us
- 9:30right into the danger zone. The sources outline
- 9:32a scenario on the venture exchange that really
- 9:35illustrates this perfectly. So instead of a shallow
- 9:37pool, think of an illiquid market like trying
- 9:40to buy 500 tickets to a sold out concert from
- 9:42scalpers outside the venue. OK, I like this.
- 9:45You look at your screen and the quoted price
- 9:47for the small cap stock is $4. You put in a market
- 9:50order for 500 shares. And because it's a thin
- 9:53market, there is very little volume resting on
- 9:55the order book. Right. So you walk up to the
- 9:57first scalper, and he has 50 shares at $4. You
- 10:00buy them. But he's out. To get the rest of your
- 10:02shares, you have to walk further down the street.
- 10:05The next scalper has 100 shares, but he wants
- 10:07$4 .10. Ouch. The guy next to him has 200 shares,
- 10:11but he is demanding $4 .50. And beyond him, there
- 10:15is absolutely no one else selling until you hit
- 10:17the $5 mark. And remember, the market order instruction
- 10:20is absolute. You told the system to fill the
- 10:23order regardless of cost. Right. So the matching
- 10:26engine dutifully marches down the street. It
- 10:28eats the 50 shares at four, the 100 at 410, and
- 10:31the 200 at 450. It still needs 150 more shares
- 10:34to complete the lot. So it reaches way up the
- 10:37ladder and buys the final block at $5 each. It's
- 10:40crazy. You wanted a stock you thought was trading
- 10:42at $4. But your average cost across the whole
- 10:45execution turns out to be $4 .40. That is a 10
- 10:49% invisible tax you paid simply for using the
- 10:51wrong order type in a thin market. Because you
- 10:54traded certainty of price for certainty of execution.
- 10:57In a liquid market with tight spreads, that trade
- 10:59-off is usually fine. But the moment you step
- 11:02into something thin, you absolutely must flip
- 11:05that priority using a limit order. Right. Because
- 11:07a limit order changes the instruction entirely.
- 11:10You are telling the broker, I care about the
- 11:13price more than I care about actually getting
- 11:15the shares. In that concert scalper scenario,
- 11:18if you set your limit order at $4 .10, you are
- 11:22drawing a hard, impenetrable line in the sand.
- 11:25Mechanically, the engine eats the 50 shares of
- 11:28$4. It takes the 100 shares at 410, and then
- 11:31it abruptly halts. It just stops? It just stops.
- 11:35Because the next available shares are at 450,
- 11:37which violates your limit, the engine stops matching.
- 11:41You secure 150 shares at excellent prices, And
- 11:45the remaining 350 shares of your order just rest
- 11:47on the book. Unfilled. Broadcasting to the market
- 11:50that you were a willing buyer, but only at 410
- 11:54or better. Now, I can hear the frustration from
- 11:56people who just want to buy their full position
- 11:59and go on with their day. Seeing a partially
- 12:01filled order can feel like the system is broken.
- 12:05But doesn't that mean my order might just sit
- 12:07there forever? It might. But we really need to
- 12:10reframe how we view that. An unfilled order is
- 12:14not a loss or a failure. It is an outcome you
- 12:17actively chose. It's a protective boundary doing
- 12:20exactly the job you hired it to do. Okay, that
- 12:23makes a lot of sense. It requires discipline,
- 12:26though. If the stock runs away and you never
- 12:28get those remaining shares, you still retain
- 12:30total control. You can always go into your account,
- 12:34reassess the situation, and raise your limit
- 12:36price if you truly want the position. What you
- 12:39absolutely cannot do is unbuy a $4 stock that
- 12:43you accidentally paid $5 for. So true. Once a
- 12:46market order executes and sweeps the book, the
- 12:48capital is gone. Wow. Okay, so we have survived
- 12:52the mechanics of the public order book, but this
- 12:54assumes your order even makes it to that public
- 12:57street of scalpers or the main exchange. The
- 13:00plumbing gets incredibly opaque here, even for
- 13:02seasoned traders, because a massive chunk of
- 13:04these orders never actually leave the broker's
- 13:06building. The sources dive into a complication
- 13:09called internalization. This is a major structural
- 13:13reality of modern trading. When you hit buy,
- 13:17your broker's routing algorithm might decide
- 13:19not to send your order to the TSX or any public
- 13:22venue. Instead, they internalize the trade. Meaning
- 13:25they keep it in -house. Exactly. They fill your
- 13:28order by matching it internally against their
- 13:30own proprietary inventory of shares, or they
- 13:32cross it against a sell order from another one
- 13:34of their own retail clients. The entire transaction
- 13:37executes inside a closed loop. So why do they
- 13:41do this? I have to assume it comes back to the
- 13:43fee structures we talked about earlier. Oh, it
- 13:45absolutely does. By crossing the trade internally,
- 13:48the broker bypasses the public exchange entirely,
- 13:51which means they don't have to pay those taker
- 13:53fees we discussed. Sneaky. Furthermore, they
- 13:56can often capture a fraction of the bid -ask
- 13:58spread for themselves. Now, regulations stipulate
- 14:01that if they internalize your trade, they generally
- 14:05have to provide you with a slight price improvement
- 14:07over the public quote, or at least match the
- 14:09best available price. So you might get a fraction
- 14:12of a cent better deal. But the macro consequence
- 14:15is that your order never interacted with the
- 14:17public order book. It never contributed to the
- 14:19public discovery of price. And we'll circle back
- 14:22to why that matters in a moment. But first, I
- 14:24want to touch on order protection. If I'm using
- 14:27a limit order and brokers are dealing with all
- 14:29these different venues and internal systems,
- 14:31what stops a broker from giving me a terrible
- 14:34fill just because it's cheaper for them? Like
- 14:36how does speed and algorithmic trading play into
- 14:39protecting my order? So for a standard retail
- 14:42order, the microsecond speed advantage of high
- 14:44frequency trading isn't really what makes or
- 14:46breaks your trade. What matters is a regulatory
- 14:50framework in Canada called the Order Protection
- 14:52Rule. Okay. It is a genuine safety net. The rule
- 14:55is essentially designed to prevent trade -throughs.
- 14:58Meaning my broker can't execute my trade at an
- 15:01inferior price on one venue if a better price
- 15:03is actively flashing on a neighboring venue.
- 15:06Precisely. If your broker routes you to venue
- 15:08A, where the ask is $80, But venue B is simultaneously
- 15:13offering shares at $79 .95. The automated systems
- 15:16are required to route around the inferior price
- 15:19and secure that $79 .95 for you. Oh, wow. That's
- 15:23actually really good. It is. Now, order protection
- 15:26does not magically eliminate market impact. If
- 15:29your order is large enough, you will still eat
- 15:31through the combined books across venues. But
- 15:33it guarantees you aren't being systematically
- 15:36gouged by poor routing choices when a better
- 15:38deal is publicly available. That is surprisingly
- 15:42reassuring. So we've covered the where and the
- 15:45how, but there's a crucial when outlined in the
- 15:48sources, the morning chaos. I assume the extreme
- 15:51volatility right at the 930 a .m. opening bell
- 15:54is basically a bottleneck of overnight news and
- 15:57queued up breakfast orders all trying to squeeze
- 15:59through the door at the exact same time. That
- 16:01is exactly what creates the bottleneck. And the
- 16:04mechanics of how the market handles that bottleneck
- 16:06are fascinating. Because the market has been
- 16:09closed for over 15 hours, a massive imbalance
- 16:12of buy and sell orders has built up. To resolve
- 16:15this, exchanges run what is called the morning
- 16:17cross or an opening auction. It's a really complex
- 16:22algorithmic process that calculates a single
- 16:25clearing price designed to execute as many of
- 16:28those queued up orders as possible the moment
- 16:30the market opens. But once that initial cross
- 16:32happens and the bell rings, it doesn't just instantly
- 16:35smooth out into a normal trading day, does it?
- 16:38No, not at all. The immediate aftermath is highly
- 16:41volatile. Market makers, the institutional firms
- 16:45whose job is to provide liquidity by constantly
- 16:47offering to buy and sell, they are very cautious
- 16:50in those first few minutes. They do not want
- 16:52to get run over by toxic overnight flow or massive
- 16:56institutional shifts reacting to an earnings
- 16:58report. Makes sense. So mechanically, they widen
- 17:01their spreads. The gap between the bid and the
- 17:04ask expands dramatically, and price discovery
- 17:07swings wildly until the buying and selling pressure
- 17:10finds an equilibrium. Which means if you send
- 17:13a market order into that environment at 9 .31
- 17:16a .m., you are basically asking for maximum market
- 17:19impact in a moment of minimum liquidity. If we
- 17:22connect this to the bigger picture, it's just
- 17:24a bad idea. Yeah. The takeaway here is incredibly
- 17:28straightforward. If you are a long -term investor,
- 17:31buying a stock you plan to hold for five years,
- 17:33there is absolutely zero reason for you to dive
- 17:36into that morning bottleneck. Just wait an hour.
- 17:39Let the morning cross settle. Let the market
- 17:41makers tighten their spreads back up. Let the
- 17:43pricing stabilize. Waiting that one hour cost
- 17:46you absolutely nothing, and it systematically
- 17:48protects you from getting caught in a massive
- 17:50temporary price spike. It really is the easiest,
- 17:53most actionable way to protect your capital without
- 17:56needing a degree in market microstructure. So
- 17:59what does this all mean? If we zoom out from
- 18:01the matching engines and the routing algorithms,
- 18:03what is the ultimate toolkit you should walk
- 18:05away with today? I think we can distill this
- 18:08entire deep dive into four critical takeaways.
- 18:11Number one, the screen price is a quote, not
- 18:14a reservation. It is a historical snapshot that
- 18:17rarely shows you the true volume sitting behind
- 18:20the price. Right. Number two, if you place a
- 18:23large order, you are going to eat through the
- 18:25order book. You will fill at progressively worse
- 18:27prices. That is market impact. and it is a self
- 18:31-inflicted wound. Number three, market orders
- 18:34trade price certainty for execution certainty.
- 18:37That is fine for massive, highly liquid stocks,
- 18:40but it is incredibly dangerous for thin, small
- 18:42-cap stocks where scalpers control the street.
- 18:45And number four, an unfilled limit order is not
- 18:48a failure. You cannot un -buy a bad price. An
- 18:52unfilled order is the exact protective boundary
- 18:55you asked for. Those principles will absolutely
- 18:57save you significant capital over a lifetime
- 19:00of investing. But before we sign off, I do want
- 19:02to leave you with something to mull over regarding
- 19:05internalization. We discussed how brokers match
- 19:08retail orders internally to save fees, shielding
- 19:11those trades from the public exchange. Right,
- 19:14the invisible trading. Think about the long -term
- 19:17systemic implication of that. The public quote
- 19:20you see on your screen, that $80 price tag, is
- 19:23supposed to represent the true intersection of
- 19:25public supply and demand. But if millions of
- 19:28retail trades are systematically removed from
- 19:30the visible market and executed in the dark,
- 19:34they stop interacting with the public order book.
- 19:38Okay. So if the visible market is constantly
- 19:41losing volume to private internal pools, how
- 19:44might that invisible trading eventually warp
- 19:46the accuracy of the public quote? If everyone
- 19:49is swimming in private pools, is the depth of
- 19:52the public pool truly representative of reality
- 19:54anymore? Man, that is a genuinely unsettling
- 19:57thought to carry forward. It suggests that the
- 20:01$80 anchor we started this whole journey with
- 20:03might become even less reliable as the underlying
- 20:06plumbing continues to evolve in the dark. Yeah,
- 20:09something to think about. For sure. Thank you
- 20:11for joining us on this custom -tailored deep
- 20:13dive. Mastering these hidden mechanics is the
- 20:16ultimate shortcut to being a truly informed market
- 20:19participant. The next time you look at a stock
- 20:21and the screen says $80, you won't just see a
- 20:24price tag. You'll know exactly what is waiting
- 20:26for you beneath the surface.