Skip to main content
Loading...

How the Stock Market Works

Understand the mechanics behind the stock market, from how exchanges operate and prices are determined to the role of market makers, settlement processes, and regulatory bodies. This guide breaks down the complex infrastructure that powers the world's financial markets.

What Is the Stock Market?

The stock market is a network of exchanges and over-the-counter markets where shares of publicly traded companies are bought and sold. It serves as a mechanism for companies to raise capital by selling ownership stakes to investors, and for investors to buy and sell those ownership stakes among themselves. When people refer to "the stock market," they are typically referring to a collection of exchanges, indices, and the broader ecosystem of participants that facilitate the trading of securities.

The stock market plays a critical role in the economy. It allows companies to access funding for growth, research, and expansion without taking on debt. It provides investors with an opportunity to participate in the profits of businesses they believe in. It creates liquidity, meaning investors can convert their shares into cash relatively quickly. And it serves as a barometer of economic health, reflecting collective expectations about corporate earnings, interest rates, and the overall direction of the economy.

Understanding how the stock market actually works, from the infrastructure of exchanges to the mechanics of price discovery, is foundational knowledge for any investor. Many people buy and sell stocks without knowing what happens behind the scenes. This guide explains each step of the process so you can make more informed investment decisions.

Stock Exchanges: NYSE and NASDAQ

Stock exchanges are organized marketplaces where buyers and sellers come together to trade shares. The two largest stock exchanges in the United States, and the world, are the New York Stock Exchange (NYSE) and the NASDAQ.

The New York Stock Exchange (NYSE)

Founded in 1792, the NYSE is the oldest stock exchange in the United States and remains the largest in the world by total market capitalization of its listed companies. The NYSE operates from its iconic building at 11 Wall Street in Manhattan, though the vast majority of trading now occurs electronically rather than on the physical trading floor.

The NYSE uses a hybrid market model that combines electronic trading with designated market makers (DMMs) on the trading floor. These DMMs are responsible for maintaining orderly trading in assigned stocks, providing liquidity during periods of imbalance, and facilitating the opening and closing auctions that set the day's first and last prices. Companies listed on the NYSE tend to be large, established corporations, including many blue-chip stocks.

The NASDAQ

The NASDAQ, founded in 1971, was the world's first electronic stock exchange. Unlike the NYSE, the NASDAQ has no physical trading floor. All trading occurs through a computerized network of dealers. The NASDAQ is known for listing many of the world's largest technology companies and is generally associated with growth-oriented and innovative firms, though it lists companies across all sectors.

The NASDAQ uses a dealer-based market model where multiple market makers compete to provide the best prices for each stock. This competition among dealers often results in tighter bid-ask spreads, particularly for heavily traded stocks.

Feature NYSE NASDAQ
Founded 1792 1971
Trading Model Hybrid (electronic + DMMs) Fully electronic dealer network
Physical Floor Yes (11 Wall Street) No
Listing Focus Large-cap, blue-chip companies Technology and growth companies
Market Makers Designated Market Makers (DMMs) Multiple competing dealers
Listing Fees Higher Lower

Over-the-Counter (OTC) Markets

In addition to the major exchanges, stocks can also trade on over-the-counter (OTC) markets. These are decentralized markets where securities not listed on the major exchanges are traded directly between parties through dealer networks. OTC markets include the OTC Bulletin Board (OTCBB) and OTC Markets Group, which operates three tiers: OTCQX (highest quality), OTCQB (venture stage), and Pink Sheets (speculative). OTC stocks typically have lower trading volumes, less transparency, and fewer regulatory requirements, making them riskier for individual investors.

How Stock Prices Are Determined

Stock prices are determined by supply and demand. When more people want to buy a stock than sell it, the price rises. When more people want to sell than buy, the price falls. This fundamental principle drives every price movement in the market, from minor daily fluctuations to major bull and bear markets.

The Bid-Ask Spread

At any given moment, a stock has two prices: the bid price (the highest price a buyer is currently willing to pay) and the ask price (the lowest price a seller is currently willing to accept). The difference between these two prices is called the bid-ask spread. For heavily traded stocks, the spread is typically very small, often just one cent. For less liquid stocks, the spread can be much wider.

When you place a market order to buy a stock, you pay the ask price. When you place a market order to sell, you receive the bid price. The bid-ask spread represents a cost of trading, though for most large-cap stocks traded on major exchanges, this cost is negligible.

Factors That Move Stock Prices

While supply and demand is the mechanism, many factors influence what buyers and sellers are willing to pay:

  • Company earnings: Quarterly earnings reports are the most significant regular driver of individual stock prices. When a company reports earnings above expectations, its stock typically rises. When it misses expectations, the stock usually falls.
  • Interest rates: When the Federal Reserve raises interest rates, stocks often decline because higher rates increase borrowing costs for companies and make bonds more attractive relative to stocks. When rates fall, the opposite effect occurs.
  • Economic data: Reports on employment, GDP growth, inflation, consumer spending, and manufacturing activity all influence investor expectations about future corporate earnings and market direction.
  • Market sentiment: Fear and greed play a significant role in short-term price movements. Positive news can create buying momentum, while negative news can trigger sell-offs that may overshoot fundamental values.
  • Industry and sector trends: Developments specific to an industry, such as regulatory changes, technological disruption, or commodity price shifts, can move entire sectors of the market.

Market Makers and Specialists

Market makers are firms that stand ready to buy and sell specific stocks at publicly quoted prices throughout the trading day. They provide liquidity to the market, ensuring that buyers can always find sellers and vice versa. Without market makers, investors might have to wait hours or days for a counterparty to complete their trade.

Market makers profit from the bid-ask spread. They buy at the bid price and sell at the ask price, pocketing the difference. In exchange for this profit, they take on the obligation to maintain continuous two-sided markets, even during periods of high volatility when other participants may step away. On the NYSE, Designated Market Makers (DMMs) have specific responsibilities for assigned stocks, including maintaining fair and orderly markets, managing the opening and closing auctions, and stepping in with their own capital to provide liquidity during imbalances.

Why Market Makers Matter to Individual Investors

Market makers ensure that when you place an order to buy or sell a stock, there is always someone on the other side of the trade. Without them, you might submit an order and wait hours for a matching buyer or seller. For most investors, market makers work invisibly in the background, but they are essential infrastructure that makes modern stock trading fast, efficient, and reliable.

Electronic Trading

The vast majority of stock trading today occurs electronically. When you place an order through your brokerage account, it is routed through a complex network of systems that match your order with a counterparty in milliseconds. This process, known as electronic order matching, has replaced most of the human-mediated trading that characterized markets for centuries.

Your broker is required to pursue best execution, meaning they must route your order to the venue that provides the best price available at the time. Orders may be routed to exchanges like the NYSE or NASDAQ, to alternative trading systems (known as dark pools), or to market makers who internalize the order. The entire process, from the moment you click "buy" to the moment your order is confirmed, typically takes less than one second.

High-frequency trading (HFT) firms use algorithms and ultra-fast connections to execute thousands of trades per second, profiting from tiny price discrepancies. While controversial, HFT firms generally add liquidity to the market and have contributed to tighter bid-ask spreads over time. However, they have also been associated with episodes of extreme short-term volatility, such as the Flash Crash of May 2010.

T+1 Settlement

When you buy or sell a stock, the trade does not settle immediately. Settlement is the process of transferring ownership of the shares from the seller to the buyer and transferring payment from the buyer to the seller. As of May 2024, US stock trades settle on a T+1 basis, meaning the trade settles one business day after the transaction date.

For example, if you sell shares on Monday, the settlement occurs on Tuesday. The proceeds from the sale will be available in your account on the settlement date. Prior to May 2024, the US used T+2 settlement (two business days), and before 2017, T+3 was the standard. The move to shorter settlement cycles reduces counterparty risk and frees up capital more quickly.

During the settlement period, a clearinghouse acts as an intermediary between the buyer and seller, guaranteeing that both sides of the trade are completed. In the US, the Depository Trust & Clearing Corporation (DTCC) handles the clearing and settlement of virtually all stock trades.

Market Hours and Extended Trading

The US stock market has specific regular trading hours and also offers extended trading sessions before and after the regular session.

Session Hours (Eastern Time) Characteristics
Pre-Market 4:00 AM - 9:30 AM Lower volume, wider spreads, reacts to overnight news
Regular Session 9:30 AM - 4:00 PM Highest volume, tightest spreads, most liquidity
After-Hours 4:00 PM - 8:00 PM Lower volume, wider spreads, reacts to earnings reports

Extended trading hours allow investors to react to news that breaks outside of regular market hours, such as earnings reports (which are typically released before or after the regular session). However, extended sessions come with risks including lower liquidity, wider bid-ask spreads, and greater price volatility. Most individual investors are best served by trading during regular market hours when liquidity is highest and spreads are tightest.

Risks of After-Hours Trading

While after-hours trading can be tempting when reacting to earnings announcements, the reduced number of participants means prices can swing more dramatically and you may not get the price you expect. Limit orders are strongly recommended during extended hours because market orders can execute at prices far from the last quoted price. Many brokers restrict the types of orders available during these sessions.

Market Indices Explained

A market index is a statistical measure that tracks the performance of a group of stocks representing a specific segment of the market. Indices provide a benchmark for measuring overall market performance and comparing individual investment returns.

  • S&P 500: Tracks 500 of the largest US companies by market capitalization, weighted by market cap. It is the most widely used benchmark for the overall US stock market and represents approximately 80% of the total US stock market value.
  • Dow Jones Industrial Average (DJIA): Tracks 30 large, well-known US companies. Unlike the S&P 500, the Dow is price-weighted, meaning stocks with higher share prices have more influence on the index regardless of company size.
  • NASDAQ Composite: Includes all stocks listed on the NASDAQ exchange, more than 3,000 companies. It is heavily weighted toward technology stocks.
  • Russell 2000: Tracks 2,000 small-cap US companies and is the most commonly used benchmark for small-cap stock performance.
  • Total Stock Market Index: Tracks virtually all publicly traded US stocks, providing the broadest possible measure of the US equity market.

You cannot invest directly in an index, but you can buy index funds and exchange-traded funds (ETFs) that track these indices, providing broad market exposure at very low cost.

Primary vs. Secondary Markets

The stock market operates through two distinct channels: the primary market and the secondary market.

The primary market is where companies issue new shares to raise capital for the first time. This occurs through an Initial Public Offering (IPO) or through subsequent offerings (secondary offerings or follow-on offerings). In the primary market, investors buy shares directly from the issuing company, and the company receives the proceeds. Investment banks underwrite these offerings, helping set the initial price and finding institutional investors to purchase the shares.

The secondary market is where previously issued shares are traded among investors. When you buy shares of a company through your brokerage account, you are almost always buying from another investor on the secondary market, not from the company itself. The company receives no money from secondary market transactions. The secondary market is what most people think of when they refer to "the stock market." It provides liquidity, allowing investors to easily buy and sell shares after the initial offering.

The IPO Process

An Initial Public Offering (IPO) is the process by which a private company offers shares to the public for the first time, becoming a publicly traded company. The IPO process typically involves several stages:

  1. Selection of underwriters: The company hires one or more investment banks to manage the offering. These banks conduct due diligence, help prepare regulatory filings, and market the shares to potential investors.
  2. SEC filing: The company files a registration statement (Form S-1) with the Securities and Exchange Commission, disclosing detailed financial information, business risks, management backgrounds, and how the proceeds will be used.
  3. Roadshow: Company executives and underwriters present to institutional investors to gauge interest and build demand for the shares.
  4. Pricing: Based on investor demand, the underwriters set the IPO price, typically the evening before the first trading day.
  5. First day of trading: Shares begin trading on the selected exchange. The opening price is often different from the IPO price and is determined by supply and demand in the open market.

IPOs can generate significant excitement, but they also carry elevated risk. Newly public companies have limited trading history, may be overvalued due to hype, and are subject to lock-up periods that restrict insider selling for 90 to 180 days after the IPO. When lock-up periods expire, the increased supply of shares hitting the market can depress the price.

Regulatory Bodies: SEC and FINRA

The US stock market is overseen by several regulatory bodies that work to ensure fair, transparent, and orderly markets.

The Securities and Exchange Commission (SEC) is the primary federal regulatory agency for the securities markets. Established by the Securities Exchange Act of 1934, the SEC is responsible for enforcing securities laws, regulating exchanges and broker-dealers, requiring public companies to disclose material financial information, investigating and prosecuting securities fraud, and reviewing corporate filings including IPO registration statements.

The Financial Industry Regulatory Authority (FINRA) is a self-regulatory organization that oversees broker-dealers and their registered representatives. FINRA writes and enforces rules governing the activities of brokerage firms, examines firms for compliance, administers licensing exams (such as the Series 7), operates a dispute resolution forum for investors and firms, and monitors trading activity for irregularities and potential fraud.

Together, the SEC and FINRA create a regulatory framework designed to protect investors from fraud, ensure that markets operate fairly, and maintain public confidence in the financial system. While no regulatory system is perfect, the US securities markets are among the most heavily regulated and transparent in the world.

Frequently Asked Questions About the Stock Market

Stock prices are set by the collective actions of all buyers and sellers in the market. There is no single entity that determines a stock's price. When a buyer's bid price matches a seller's ask price, a trade occurs at that price, which becomes the stock's current market price. Market makers facilitate this process by continuously quoting bid and ask prices, but they do not control or set prices. The price reflects the aggregate of all available information, expectations, and sentiments of the millions of market participants at any given moment.

When you buy a stock, your broker receives your order and routes it to a venue where it can be matched with a seller. This happens electronically in milliseconds. Your order might go to a stock exchange like the NYSE or NASDAQ, to an alternative trading system, or to a market maker. Once a match is found, the trade is executed and your broker confirms the purchase. Over the next business day (T+1 settlement), the clearinghouse processes the trade, transferring ownership of the shares to your account and payment to the seller. The shares are held electronically in your name by your brokerage firm.

Stock exchanges generate revenue from several sources. They charge listing fees to companies that want their shares traded on the exchange. They earn transaction fees on each trade executed through their systems. They sell market data, including real-time price quotes and trading information, to brokers, data providers, and financial firms. They also generate revenue from technology services, regulatory fees, and licensing their indices. For example, the S&P 500 index generates licensing revenue when fund companies create products that track it. Both the NYSE and NASDAQ are publicly traded companies themselves.

If you invest in individual stocks, it is theoretically possible to lose your entire investment if a company goes bankrupt and its shares become worthless. However, if you invest in a broadly diversified index fund that holds hundreds or thousands of stocks, losing all your money is virtually impossible because it would require every company in the index to fail simultaneously. The key to managing this risk is diversification. A diversified portfolio of index funds has never gone to zero in the history of the US stock market, though it can and does decline significantly during bear markets before recovering.

The NYSE and NASDAQ are both stock exchanges, but they differ in structure and history. The NYSE, founded in 1792, uses a hybrid model with both electronic trading and Designated Market Makers on a physical trading floor. It is historically associated with large, established blue-chip companies. The NASDAQ, founded in 1971, was the first fully electronic exchange with no physical floor. It uses a dealer-based model where multiple market makers compete to provide prices. The NASDAQ is known for listing technology and growth companies. From an investor's perspective, the exchange a stock is listed on has minimal impact on your experience, as both provide efficient, liquid trading through modern brokerage platforms.

Continue Learning

Explore related investment topics to expand your knowledge.

Pavlo Pyskunov

Written By

Pavlo Pyskunov

Reviewed for accuracy

Finance educator and founder of InvestmentBasic. Passionate about making investment education accessible to everyone, with a focus on practical, beginner-friendly content backed by data.

Start typing to search across all investment topics...

Request an AI summary of InvestmentBasic