How Stock Markets Work
Learn how stock exchanges match orders, what determines price, how sessions differ, and how circuit breakers and T+1 settlement affect active traders.
Knowing that stocks exist is not the same as understanding how they trade. Price is not set by a single authority; it emerges from a continuous negotiation between millions of participants operating within a precise mechanical framework. Traders who do not understand that framework make systematic errors in order placement, session timing, and execution quality that persist for years. This course removes those errors at the foundation.
1. The Exchange: A Continuous Double Auction
A stock exchange is, at its core, a regulated venue for matching buy and sell orders in a securities market. The dominant US model is the continuous double auction: bids (buy orders) and offers (sell orders) enter the exchange matching engine continuously throughout the trading session, and the engine pairs them according to strict priority rules.
The two dominant US equity exchanges are the New York Stock Exchange (NYSE) and NASDAQ. NYSE uses a hybrid model combining electronic order matching with Designated Market Makers (DMMs) who maintain orderly markets in assigned securities. NASDAQ is fully electronic, relying on competing registered market makers who continuously quote bid and ask prices. Both operate under SEC oversight with FINRA as the primary self-regulatory body.
Beyond NYSE and NASDAQ, dozens of additional trading venues — including CBOE, IEX, and various Alternative Trading Systems (ATSs) and dark pools — also execute US equity orders. Federal regulation requires broker-dealers to route customer orders to the venue offering the best available price (the National Best Bid and Offer, or NBBO), which means your order may fill on any of these venues rather than exclusively on the primary listing exchange.
2. How Orders Are Prioritised: Price-Time Priority
Matching engines rank orders by two rules applied in sequence. Price priority is first: a limit buy order at $100.00 is matched before one at $99.90, because it is willing to pay more and therefore takes priority over the more conservative bid. On the sell side, a limit order at $100.00 takes priority over one at $100.10 for the symmetric reason.
When multiple orders share the same price, time priority resolves the tie: the order that arrived at the exchange first is filled first. This creates real operational consequences for active traders. In a fast-moving liquid stock, a limit order placed at the best bid or ask can be thousands of orders deep in the queue; a market order routes to the front but surrenders price control.
The bid-ask spread — the gap between the best bid ($99.95 in the example above) and the best ask ($100.00) — is not a fee charged by the exchange. It is the cost of immediacy: if you need to transact now, you either lift the offer (buy at the ask) or hit the bid (sell at the bid), paying the spread to the liquidity provider on the other side. In deeply liquid large-caps the spread may be one cent or less; in thinly traded micro-caps it can be five to fifty cents or more. Tracking spread costs is as important as tracking commission costs for active trading strategies.
3. Market Sessions and Their Distinct Risk Profiles
US equity markets operate on a structured daily schedule that creates distinct liquidity and volatility regimes across four periods. Understanding these regimes prevents basic execution errors and creates opportunities for traders who read session dynamics correctly.
- Pre-Market (4:00–9:30 AM ET) Thin liquidity, wide spreads, heavily influenced by overnight earnings and macro news. Gaps form here. Limit orders only at most brokers. Volume concentrates in the 7:00–9:30 window.
- Regular Session (9:30 AM–4:00 PM ET) Maximum liquidity and tightest spreads. The opening 30 minutes and final 30 minutes carry the highest volume. VWAP is calculated from the 9:30 open. Official closing price set by the 4:00 PM closing auction.
- After-Hours (4:00–8:00 PM ET) Earnings releases concentrate here. Large price moves on low volume can reverse sharply at the next regular open. Wide spreads return. Exercise heightened caution with size.
- Overnight Gap The risk that the opening print diverges substantially from the prior close. Unlike 24/7 crypto markets, US equities have a hard structural break each evening that concentrates news-driven price adjustment into the opening auction.
See the pre-market and after-hours trading guide in the stock glossary for a detailed mechanics walkthrough. The gap risk concept introduced above is expanded in Course 4.
4. Indices: What They Measure and Why They Move Markets
Stock market indices are statistical composites representing the aggregate performance of a defined universe of securities. They do not trade directly; they are calculated values. Understanding the construction and weighting of major indices explains why individual stock moves can be amplified or dampened by index mechanics.
The S&P 500 is a float-adjusted market-capitalisation-weighted index of approximately 500 large-cap US companies selected by the S&P Index Committee. “Float-adjusted” means each company’s weight is proportional to its freely tradeable shares, not total shares outstanding. The largest five or six companies by market cap regularly command 20–25% of the entire index weight, meaning their moves have outsized effects on index performance. The S&P 500 serves as the underlying for the world’s most actively traded options and futures contracts, making it the central gravitational axis of US equity pricing.
The NASDAQ-100 contains the 100 largest non-financial NASDAQ-listed companies, heavily concentrated in technology. Its outsized technology weighting makes it the preferred vehicle for expressing macro views on growth stock valuations, interest rate sensitivity, and AI-driven earnings themes. The Dow Jones Industrial Average is price-weighted — an idiosyncratic calculation that gives higher-priced stocks more index influence regardless of market cap — and is less analytically rigorous than cap-weighted indices, though it retains cultural and media significance.
5. Circuit Breakers and Market-Wide Halts
Equity markets include structural safeguards that override normal continuous trading under extreme conditions. Circuit breakers trigger market-wide pauses when the S&P 500 declines sharply from its prior close: a 7% drop triggers a 15-minute halt (Level 1), a 13% decline triggers another 15-minute halt (Level 2), and a 20% decline halts trading for the remainder of the session (Level 3). These thresholds were triggered twice in March 2020 during the COVID-19 market dislocation.
Individual securities can also be halted under the Limit Up–Limit Down (LULD) mechanism, which pauses trading in any stock that moves beyond a defined percentage band from its five-minute average price. LULD halts last five minutes and are particularly common in volatile small-caps and micro-caps. For active traders, this means positions cannot be exited during a halt — a direct argument for pre-defining stop-loss levels before entering trades and using our stock position size calculator to size positions so that a halt-induced inability to exit stays within predefined loss limits.
6. Settlement, Clearing, and What Happens After You Trade
A trade execution is not the end of the transaction; it initiates a settlement process that delivers securities and cash between counterparties. US equity markets settled on a T+1 basis as of May 2024 (reduced from T+2), meaning shares and cash change hands the business day following the trade date. During the settlement window, the DTCC (Depository Trust & Clearing Corporation) acts as central counterparty, guaranteeing trade completion even if one party defaults.
For retail traders, the immediate practical consequence of T+1 settlement is buying power in cash accounts: proceeds from a stock sale on Monday are typically available to fund new purchases on Tuesday. Margin accounts can access proceeds sooner through the broker’s credit, but margin adds leverage and its associated costs and risks. Broker-specific rules govern how buying power is calculated during the settlement period; review your broker’s documentation before assuming same-day reuse of sale proceeds in a cash account.
Key Takeaways
| Concept | What to remember |
|---|---|
| Price formation | Continuous double auction; last trade is agreed price, not authoritative value |
| Order priority | Price first, then time; queue position matters in fast markets |
| Spread | Cost of immediacy, not an exchange fee; widens in thin or fast-moving markets |
| Sessions | Pre-market and after-hours carry wider spreads and gap risk; regular session has best liquidity |
| Halts | Circuit breakers (market-wide) and LULD (individual stocks) can prevent exits; size for halt risk |
| Settlement | T+1; cash account buying power delayed one business day after a sale |
Tools for This Course
- Stock Position Size Calculator — size trades to survive halts and gaps; the core free position size calculator for stocks.
- Stock P&L Calculator — model entry/exit outcomes including spread cost as a component of net return.