How Markets Work
Exchanges, order types, and the bid-ask spread · 14 min
Exchanges and Brokers
Stock exchanges are regulated marketplaces where buyers and sellers meet to trade securities. The two main U.S. equity exchanges are the NYSE (New York Stock Exchange, founded 1792) and NASDAQ (founded 1971 as the first electronic exchange).
Individual investors access exchanges through brokers (Fidelity, Charles Schwab, Robinhood, Interactive Brokers). When you submit an order through a broker app, your order routes to an exchange or market maker who finds a counterparty. The broker earns a commission (often $0 for retail, but earns "payment for order flow" from market makers for routing trades to them).
The Bid-Ask Spread
At any moment, a stock has two prices:
- Bid: the highest price any buyer is currently willing to pay
- Ask (offer): the lowest price any seller is currently willing to accept
The spread = Ask − Bid. This is the transaction cost for immediate execution. For large-cap stocks like Apple, the spread might be $0.01 (one cent). For illiquid small-caps, spreads can be $0.50 or more.
If you submit a market order to buy, you pay the ask. If you submit a market order to sell, you receive the bid. The market maker captures the spread as compensation for providing liquidity — standing ready to buy or sell on demand.
Order Types
Knowing your order types prevents costly mistakes:
- Market order: Execute immediately at whatever the current price is. Guarantees execution, not price. Never use market orders on illiquid stocks — you might pay far more than expected.
- Limit order: Execute only at your specified price or better. Buy limit at $100 means you buy only if someone will sell at $100 or less. Guarantees price, not execution.
- Stop order (stop-loss): Becomes a market order once the price hits your stop price. Used to limit losses: "sell if price falls to $90."
- Stop-limit order: Becomes a limit order at your stop price. Avoids the gap-down problem of a pure stop order.
For most investors making deliberate purchases, limit orders are almost always better than market orders. The difference in execution quality on a $10,000 trade can easily be $10–50.
The Order Book
Every exchange maintains an order book — a real-time list of all outstanding limit orders. The best bid and best ask (the top of the book) form the National Best Bid and Offer (NBBO), which brokers are legally required to give you.
Below the best bid are lower bids (buyers willing to pay less). Above the best ask are higher asks (sellers wanting more). The order book shows the depth of liquidity — how much you could buy or sell without moving the price.
High-frequency trading firms (HFTs) operate at microsecond timescales, continuously posting and canceling orders in the book to capture the spread and react to news faster than any human.
Price Impact and Market Impact
When a large order hits the market, it "walks up" (or down) the order book, consuming multiple price levels. This is called market impact. A retail investor buying $5,000 of Apple (a $3 trillion company) has essentially zero market impact. A hedge fund buying $500 million of Apple in a single day will move the price — and sophisticated traders know how to minimize this cost through algorithmic execution (VWAP, TWAP algorithms).
Indices: The Market's Report Card
Stock market indices aggregate price movements across many companies into a single number:
- S&P 500: 500 large U.S. companies, weighted by market cap. The most important benchmark for U.S. equities.
- Dow Jones Industrial Average (DJIA): 30 large U.S. companies, price-weighted (higher-priced stocks have more influence). Old-fashioned and less representative than S&P 500.
- NASDAQ-100: 100 largest non-financial NASDAQ companies, heavily tilted toward tech.
- Russell 2000: 2,000 small-cap U.S. companies. Measures the health of smaller businesses.
Index funds and ETFs track these indices, giving investors instant diversification at extremely low cost.