basics

How the Stock Market Works

The stock market is a network of exchanges and trading venues where shares change hands. How the NYSE, Nasdaq, and TSX work, who trades, and what happens to your order.

The stock market is the network of exchanges and other trading venues where investors buy and sell shares of public companies. Companies use it to raise money when they first sell shares, and after that it is mostly a place where investors trade those shares with each other.

In short: there are two markets. In the primary market, a company sells new shares to investors and receives the money. In the secondary market, which is what people usually mean by “the stock market,” investors trade existing shares among themselves, and the company receives nothing. Exchanges, brokers, market makers, and clearing houses are the plumbing that makes the secondary market fast and reliable.

Primary vs secondary market

When a company goes public through an initial public offering, it sells shares to investors, usually with the help of investment banks. That cash goes to the company (and to any existing shareholders who sell). The process is explained in how IPOs work.

From then on, the shares trade in the secondary market. If you buy 100 shares of a large company on a Tuesday afternoon, you are almost certainly buying them from another investor or a market maker, not from the company. The company cares about its share price because it affects future fundraising, employee pay, and acquisitions, but day-to-day trading does not put money in its bank account.

The exchanges

An exchange is a regulated marketplace that lists companies’ shares and runs a system for matching buy and sell orders.

United States

  • New York Stock Exchange (NYSE). Traces its origin to the Buttonwood Agreement signed by 24 brokers in May 1792. It still keeps a trading floor, alongside its electronic systems.
  • Nasdaq. Began operating in February 1971 as the first electronic stock market. Many large technology companies list there.
  • Several other registered exchanges, plus off-exchange venues. A stock listed on the NYSE can trade on many venues at once.

Canada

  • Toronto Stock Exchange (TSX). Formally founded in October 1861, and now owned by TMX Group. It is Canada’s senior exchange for larger companies.
  • TSX Venture Exchange (TSXV). Also run by TMX, for smaller and earlier-stage companies, many in mining and resources.
  • Cboe Canada and the Canadian Securities Exchange (CSE) are other listing venues, and alternative trading systems also trade TSX-listed shares.

Regular trading hours are 9:30 a.m. to 4:00 p.m. Eastern time on the NYSE, Nasdaq, and TSX. Trading outside those hours exists but works differently; see market hours and after-hours trading.

Many venues, one price

In the US, trading is fragmented across exchanges, alternative trading systems (including “dark pools” that don’t display orders publicly), and wholesalers that handle retail orders. The SEC’s Regulation NMS, adopted in 2005, ties these venues together. Among other things, it created a consolidated view of the best displayed bid and offer across exchanges, the national best bid and offer (NBBO), and generally requires that trades not happen at prices worse than the best protected quotes. The NBBO is explained in bid-ask spread explained.

Canada has its own version of this framework, including order protection rules that require trades to respect the best displayed prices across Canadian marketplaces.

Who is trading

  • Retail investors: individuals trading through brokerage accounts, including registered accounts such as RRSPs, TFSAs, and IRAs.
  • Institutional investors: pension funds, mutual funds, ETF managers, insurance companies, and hedge funds. They manage most of the money in the market and trade in large sizes.
  • Market makers: firms that continuously post prices at which they will buy (the bid) and sell (the ask). They earn the difference and take on the risk of holding inventory.
  • High-frequency and proprietary traders: firms using fast automated systems, often acting as market makers or arbitraging small price differences between venues.

Market makers, at a high level

Market makers are why you can usually buy or sell a large-company stock instantly. Without them, a buyer would have to wait until a seller happened to show up at a compatible price.

  • On the NYSE, each listed stock has a designated market maker (DMM) with obligations to maintain a fair and orderly market, including running the opening and closing auctions.
  • On Nasdaq, multiple competing market makers post quotes in the same stock.
  • The TSX also assigns market makers to securities, with responsibilities to support liquidity.

In return for providing liquidity, market makers aim to earn the spread over many trades. In fast or frightening markets, they can widen their quotes or step back, which is one reason prices can gap.

What happens when you place an order

Suppose you want to buy 100 shares of a stock quoted at a bid of $50.00 and an ask of $50.02.

  1. Your broker receives the order. It checks that you have the money (or margin) and decides where to send the order. US brokers have a duty of best execution.
  2. The order is routed. It might go to an exchange, an alternative trading system, or a wholesaler that fills it from its own inventory.
  3. It is matched. A market order to buy fills against the best available offer. At $50.02, you pay 100 × $50.02 = $5,002.00.
  4. It clears and settles. The trade is reported, and the clearing house steps between buyer and seller to guarantee completion. Since May 2024, standard settlement in both countries is T+1: one business day after the trade date. Canada moved on May 27, 2024 and the US on May 28, 2024. In the US, clearing runs through DTCC’s National Securities Clearing Corporation; in Canada, through CDS. Details are in how a stock trade settles.

The midpoint of that quote was $50.01, so crossing the spread cost you 100 × $0.01 = $1.00 compared with the mid. On a heavily traded stock that cost is small. On a thinly traded one, the spread can be many times wider.

A worked example: where the money goes

Maple Widgets Inc. (hypothetical) goes public by selling 10,000,000 new shares at $20.00.

  • Gross proceeds: 10,000,000 × $20.00 = $200,000,000.
  • If the underwriters’ fee (the gross spread) is 7%, a common level for mid-sized US IPOs: $200,000,000 × 0.07 = $14,000,000.
  • The company receives about $186,000,000 before other costs. That is the primary market.

The next morning the shares open at $23.00 and 4,000,000 shares change hands during the day. If the average price is $23.00, about 4,000,000 × $23.00 = $92,000,000 of trading occurs. Maple Widgets receives none of it. That is the secondary market: investors swapping ownership among themselves.

Who regulates it

  • United States: the Securities and Exchange Commission (SEC) oversees exchanges, brokers, and public company disclosure. FINRA, a self-regulatory organization overseen by the SEC, supervises broker-dealers.
  • Canada: securities regulation is provincial and territorial. The regulators coordinate through the Canadian Securities Administrators (CSA). The Canadian Investment Regulatory Organization (CIRO), formed in 2023, oversees investment dealers and trading activity on Canadian marketplaces.

If a brokerage firm fails, customer accounts in the US may be protected by SIPC up to $500,000 (including up to $250,000 in cash), and in Canada by CIPF, which covers eligible accounts at member firms up to $1 million per account category. Neither protects you against investment losses. The full picture is in how stock markets are regulated.

Listing, delisting, and interlisting

To have its shares traded on an exchange, a company must meet the exchange’s listing standards: minimums for things like share price, number of shareholders, publicly held shares, and market value or earnings. It must keep meeting continued listing standards afterwards, along with the disclosure rules of the securities regulators. A company that falls short can be delisted. In the US, delisted shares may still trade over the counter (OTC), with far less liquidity and often less disclosure. In Canada, the TSX Venture Exchange has lighter requirements, organized in tiers, for smaller companies.

Many large Canadian companies are interlisted: their shares trade on the TSX in Canadian dollars and on the NYSE or Nasdaq in US dollars. It’s the same share, so the two prices stay closely linked through the exchange rate. If a stock trades at C$70.00 on the TSX and one US dollar costs C$1.40 (a round, illustrative rate), the equivalent price is C$70.00 ÷ 1.40 = US$50.00. If the New York price drifted to US$50.50, traders could buy in Toronto and sell in New York until the gap closed, minus their costs. For a Canadian investor, buying the TSX line avoids converting currency, which at some brokers can cost more than the trade itself.

What can go wrong

  • Halts and circuit breakers. Exchanges can halt trading in a single stock for pending news or extreme moves. Market-wide circuit breakers in the US pause all trading if the S&P 500 falls 7% or 13% from the prior close (Level 1 and 2, before 3:25 p.m.) and end trading for the day at 20%. CIRO coordinates halts on Canadian marketplaces with these US triggers.
  • Flash events. On May 6, 2010, US stock prices plunged and rebounded within minutes, with the Dow Jones Industrial Average down nearly 1,000 points at one point. Some trades were cancelled afterwards.
  • Thin trading. Small companies, especially on venture exchanges, can trade rarely, with wide spreads and prices that move sharply on small orders.
  • Outages. Exchanges and brokers occasionally have technical failures, and you may not be able to trade when you want to.

The takeaway

The stock market is less a single place than a regulated network: exchanges that list companies and match orders, market makers that keep quotes available, brokers that route orders, and clearing houses that make sure trades settle. Companies raise money once in the primary market. After that, the secondary market is where investors set the price, which is the subject of how stock prices are set.

Related: How Stock Prices Are Set · What Is a Stock? · How to Buy a Stock · How Stock Markets Are Regulated

#stock market#exchanges#NYSE#Nasdaq#TSX#market makers