Quant Terminal
B1-03B1·intro·~19 min

How prices actually form

marketsmicrostructureorder-bookbid-askorder-types

▸ Pretest — guess, even if you don't know

If a stock is 'quoted at $100,' which of these statements is most accurate?

The order book

When you watch a stock chart, you see a stream of "prices." Those are usually last trades — records of deals that already happened. The current state of the market at any instant is the order book — the exchange's live list of every buy and sell order that hasn't traded yet. Waiting buy orders are called bids; waiting sell orders are called asks.

A simplified order book for AAPL might look like this:

       SELL SIDE (asks)
       Size   Price
        500   $192.05
        300   $192.04
        100   $192.03   ← best ask
   ─────────────────────  spread = $0.02
        200   $192.01   ← best bid
        700   $192.00
       1100   $191.99
       SIZE   Price
        BUY SIDE (bids)

Two things to notice:

The "price" you see on a quote screen is usually the midpoint — halfway between the best bid and best ask. AAPL "at 192.02"meansbid=192.02" means bid=192.01, ask=$192.03. Note you can't actually trade at that midpoint number.

Who provides the bid and ask?

Mostly market makers — firms whose whole business is continuously posting both a bid and an ask (recall them from B1-01). They place both quotes a little on either side of what they estimate the stock is really worth. The plan: buy at the bid, sell at the ask, and pocket the spread on each round-trip — one buy plus one matching sell. They lose when the price moves sharply while they're holding inventory — shares they've bought but not yet offloaded.

The resting orders in the book are the market's liquidity — how easily you can buy or sell without moving the price. Retail traders, hedge funds, and institutional algorithms mostly take that liquidity: they trade against the resting orders rather than posting their own. Takers pay the spread to market makers. The market makers' steady earnings come from being on both sides simultaneously.

This is the most important thing to internalize: most of the time, when you click "buy at market," you are paying the spread. The market maker is the immediate counterparty — the one on the other side of your trade. They thank you for the spread, and they don't care which direction the stock goes next — they'll trade either way.

Order types — the four you must know

The exact menu of order types varies by venue and instrument, but four are universal:

Market order

"Buy/sell N shares at whatever price the market gives me, right now."

Limit order

"Buy at 192.01orbetter,sellat192.01 or better, sell at 192.03 or better."

Stop order (stop-loss)

"If price falls to $190.00, place a market order to sell."

Stop-limit

"If price falls to 190.00,placealimitsellorderat190.00, place a *limit* sell order at 189.50."

There are many more (Iceberg, IOC, FOK, post-only, hidden, midpoint-peg, ... — names you can look up if you ever need them), but these four cover ≥90% of what we'll discuss.

Why this matters for backtests

A backtest is a simulation of a trading strategy on historical data, to estimate how it would have done. When you backtest, you have a price series — usually daily closes (the last traded price of each day), sometimes minute bars (one summary row per minute of trading). The question that destroys most retail backtests is: what price would I have actually filled at?

A naive backtest on close prices that shows 8% annual returns frequently shows 0% or negative once realistic spreads and slippage are modeled. We'll come back to this when we cover backtesting methodology (Track D4).

⧉ Review card
What is the bid-ask spread?
The difference between the best price a buyer will pay (bid) and the best price a seller will accept (ask). Crossing it is a cost paid by liquidity takers, earned by market makers.
⧉ Review card
Why is the 'quoted price' not really one number?
It's typically the midpoint of bid and ask. You can't actually trade at the midpoint — you buy at the ask, sell at the bid.
⧉ Review card
What's the difference between a market order and a limit order?
Market: guaranteed fill, zero price control. Limit: price control, no fill guarantee. Pros default to limits.
⧉ Review card
What goes wrong with a stop order in a gap-down?
The stop triggers a market order at the gap price — you can fill far below your stop level. Stop-limits avoid this but can fail to fill entirely.
⧉ Review card
Why do most retail backtests overstate returns?
They assume fills at quoted prices (often the close), ignoring the bid-ask spread and slippage. Honest cost modeling often cuts the headline performance in half or worse.

Predict before the next lesson

Tomorrow we'll trace a single trade from "click buy" to "shares in your account." Before then, predict:

Write your guesses. Tomorrow we'll see how close they are.

◈ Calibration check

How comfortable are you with the order book, spread, and the four order types?

1 = guessing · 5 = could teach it

⏻ End of lesson

Mark it read to book its 5 review cards into your deck.

Sources & further reading