You see one quoted price. The market sees a whole ladder. That ladder is the order book: the exchange's live list of every outstanding limit order — an order to buy or sell at a specified price or better.
One side holds the bids, offers to buy. The other holds the asks, offers to sell. Say the best bid is $50.00 for 300 shares and the best ask is $50.02 for 500. Below sit more bids at $49.99, $49.98, and so on; above, more asks. The quantity resting at each rung is called depth. A liquid large-cap has thousands of shares stacked at every level; a small-cap might have thin, gappy rungs.
The famous last price is just a rearview mirror — a record of the most recent trade. The book is the actual market: what you can really buy or sell right now.
The gap between the best bid and the best ask is the bid-ask spread. In our example it's 2 cents: buyers who want to trade instantly pay $50.02, sellers who want out instantly receive $50.00. Buy and immediately sell and you've lost the spread. It's a real cost on every round trip — commission-free doesn't mean cost-free.
Why does it exist? Someone has to stand ready to trade with you at all times, and standing ready is risky. The people quoting those prices face a danger economists call adverse selection: the counterparty who urgently wants to trade may know something you don't. The spread is partly an insurance premium against being on the wrong side of informed traders.
That's why spreads widen exactly when you least want them to — around earnings, during crashes, in the first minutes after the open — and why they're wider on illiquid stocks. For active strategies, the spread compounds brutally: trade a 0.1% spread two hundred times a year and you've paid out roughly 20% of your capital in spreads alone.
Most of the resting orders at the top of the book come from market makers: professional firms whose business is continuously quoting both a bid and an ask, earning the spread over thousands of small trades. They're the reason you can sell at 2:14 PM on a random Tuesday without finding another human who wants your exact shares.
The job sounds like free money. It isn't, because of inventory risk: a market maker who keeps buying while a stock slides accumulates a losing position. Survival means managing inventory — leaning quotes against the position, hedging, and stepping back when uncertainty spikes.
That last habit explains why liquidity evaporates precisely when it's most wanted. In calm markets, makers quote tight spreads and deep size. When news hits, they widen spreads and shrink size within milliseconds, because quoting stale prices into an informed stampede is how market makers die. Modern market making is dominated by a handful of high-speed firms — remember that when we get to where retail orders actually go.
Exchanges match orders by a strict rule called price-time priority. Better prices trade first: a bid at $50.01 beats every bid at $50.00. Among orders at the same price, earlier ones trade first. On busy stocks, an early limit order claims a spot in line, not just a price.
Now follow a market order — an order to trade immediately at the best available price — through the machine. You send a market buy for 1,000 shares. The engine fills 500 at the best ask of $50.02, exhausting that rung. The next 300 fill at $50.03, the last 200 at $50.05. Your average price: about $50.03, a cent or so worse than the quote you saw. That difference is slippage, and it grows with order size and shrinks with depth. On a thin small-cap, even a modest market order can walk several rungs in a blink.
Limit orders cap your worst fill at the price you set, at the cost of possibly not filling. And before trading anything illiquid, compare your order size to the displayed depth: if you're bigger than the top of the book, you are the market impact.
In the U.S., most retail orders never touch an exchange. Your broker routes them to a wholesaler — a large market-making firm — which fills the order from its own inventory and pays your broker for the privilege. That payment is called payment for order flow, or PFOF. It's a major reason zero-commission trading exists: the broker earns from the wholesaler instead of from you.
Why pay to trade with you? Because retail orders are, on average, uninformed — small, uncorrelated, rarely driven by knowledge the market lacks — so trading against them carries little adverse-selection risk, and a wholesaler can profitably fill them at prices slightly better than the best public quote. That price improvement is real and measurable; regulators require brokers to report it.
The criticism is also serious. The broker's incentive is to route where it's paid, which may not be where you'd get the very best fill, and the benchmark quote is arguably wider than it would be if retail flow met the full market. Regulators disagree too: the U.K. bans the practice, Canada's rules effectively prohibit it for Canadian-listed stocks, and the U.S. has reviewed it repeatedly and, so far, kept it. The honest summary: the per-trade effect on you is fractions of a cent — minor for long-term investors, worth studying for very active ones.
Microstructure feels like plumbing, but it decides whether a strategy that works on paper works in your account.
A backtest fills trades at recorded prices, usually the day's close. Your real order pays the spread, suffers slippage, and moves the price if the stock is thin. For a buy-and-hold investor, these frictions are a rounding error. For a strategy trading weekly, they're a tax; trading daily, they're often the whole verdict. A useful discipline when testing any active idea against history: charge every simulated trade a realistic cost — spread plus a slippage allowance, scaled up for illiquid names — and watch how the equity curve changes. Many promising edges die right there, and better in simulation than in your account. Edges that survive honest costs still tend to shrink in live trading, because markets adapt.
A few habits fall straight out of the mechanics: prefer limit orders on anything with a wide spread, be careful in the first and last minutes of the session, and never send large market orders into thin books. None of this makes a bad strategy good. It stops the plumbing from quietly ruining a decent one.
Previous: Machine Learning in Investing: Promise vs Reality · Next: Pairs Trading and Statistical Arbitrage · Financial glossary
← Back to all investing concepts