Astra Trainer
Business & Finance

How Does the Stock Market Work? Orders, Not Magic

11 min read

How does the stock market work? At its simplest, it is a marketplace where shares in companies are bought and sold. A company sells shares once to raise money; after that, the shares are traded between investors, and the price at any moment is just the point where the most someone will pay meets the least someone will accept. Everything else, the indexes, the headlines, the screens full of numbers, is built on top of that one mechanism.

This article explains where stock markets came from, the difference between the first sale and all the trading after it, how an exchange matches orders, why prices move, and what the market does and does not tell you. It describes how the system works and gives no view on buying or selling anything.

How does the stock market work?

A share is a small unit of ownership in a company. Owning one gives you a claim on part of what the company is worth and, usually, a vote on some decisions. The article on stocks, bonds and options explains exactly what that claim is and where it sits compared with other securities.

The stock market is the collection of places and systems where those shares change hands. Mostly this means stock exchanges, such as the New York Stock Exchange, Nasdaq or the London Stock Exchange, along with the brokers and electronic systems that connect buyers and sellers to them.

The key point is that most trading is not between investors and companies. It is between investors and other investors. When you buy a share on an exchange, you are almost always buying it from someone who is selling it.

When you buy a share, the company usually gets nothing. You are buying it from another investor.

Where stock markets came from

The first shares traded on a regular public market belonged to the Dutch East India Company, founded in 1602 to finance trading voyages to Asia. It issued shares that could be transferred easily, and within days people in Amsterdam had begun buying and selling them. The Amsterdam market that grew up around those shares is often described as the first stock exchange.

In New York, on 17 May 1792, 24 brokers and merchants signed the Buttonwood Agreement, traditionally said to have been signed under a buttonwood tree on Wall Street. They agreed to trade with each other on common terms. It is regarded as the origin of the New York Stock Exchange, though the exchange was not formally organised until 1817.

The basic purpose has not changed in four hundred years: letting companies raise money from many people, and letting those people sell their stake to someone else instead of waiting for the company to pay them back.

Start the Markets course
Short lessons with quizzes. Free to begin.
Start the Markets course →
Check yourselfA listed company receives nothing when investors trade its shares with each other. So why should it care whether those shares are easy to sell later? Decide before reading on.Show the answer

Because it decides how well the first sale goes. Investors are far more willing to buy shares in an IPO if they know they can sell them easily later, instead of waiting for the company to pay them back. A liquid secondary market is what makes the primary market work.

Primary and secondary markets

There are two quite different kinds of transaction under the name "stock market".

The primary market is where a company sells new shares to raise money. The best-known example is an initial public offering, or IPO, when a private company first sells shares to the public and lists them on an exchange. The money goes to the company, which uses it to grow, pay debts or let early owners sell part of their stake.

The secondary market is everything after that: investors trading existing shares with each other. The company is not a party to these trades and receives nothing from them. This is where almost all daily trading happens, and what people usually mean when they talk about the stock market going up or down.

The secondary market matters to companies anyway. Investors are far more willing to buy shares in an IPO if they know they can sell them easily later. A liquid secondary market is what makes the primary market work.

How an exchange matches orders

An exchange is, at heart, a system for matching orders. Buyers submit bids, the price they are willing to pay. Sellers submit asks or offers, the price they are willing to accept. The exchange keeps these in an order book, sorted by price.

TermWhat it means
BidThe highest price a buyer is currently offering
AskThe lowest price a seller is currently accepting
SpreadThe gap between the bid and the ask
Market orderAn instruction to buy or sell now, at the best available price
Limit orderAn instruction to buy or sell only at a stated price or better

A trade happens when a bid and an ask meet. If someone places a market order to buy, it is matched with the lowest ask. The price of that trade becomes the latest price shown on screens. The "price of a stock" you see quoted is simply the last price at which a buyer and a seller agreed.

Most trading today is electronic and extremely fast. Brokers pass customers' orders to exchanges or other trading venues, and market makers, firms that stand ready to buy and sell continuously, keep the order book full, earning the spread in return for the risk they take.

How this is taught inside Astra Trainer

The Markets direction in the Business & Finance world runs to eighteen courses on knowing what you own when you buy a stock, a bond or an option, with courses such as Basics in Markets, Global Market Ecosystem and Stocks covering how the machinery fits together.

Understanding the mechanism first, how orders meet and what a price actually is, makes every later topic easier to follow. Lessons take about five minutes and a guide walks you through anything strange.

Why prices move

A share price moves when the balance between buyers and sellers changes. If more people want to buy at current prices than want to sell, buyers have to bid higher to find sellers, and the price rises. If more want to sell, sellers accept lower prices, and it falls.

What changes that balance is mostly expectations about the company's future: its profits, its prospects, the risks it faces. A company's results, news about its industry, changes in interest rates and shifts in the wider economy all change what investors expect, and therefore what they are willing to pay today.

Crowd psychology plays a part too. Prices can rise because they have been rising, and fall because they have been falling, well beyond what changes in the underlying business justify. The long history of bubbles, from the South Sea Company in 1720 to the dot-com boom of the late 1990s, shows how far prices can drift from any reasonable estimate of value before snapping back.

See the Take Control of My Money path
A goal-built path: courses chained in the order they pay off.
See the Take Control of My Money path →

Indexes: how "the market" is measured

When the news says the market rose or fell, it usually means an index moved. An index tracks the combined price of a defined group of shares. The Dow Jones Industrial Average, first published in 1896, now follows 30 large US companies. The S&P 500 follows 500. Other indexes track smaller companies, particular sectors or other countries.

Indexes are a summary, not the market itself, and different indexes can tell different stories on the same day. The article on index funds explains how indexes are built and why their construction matters.

Rules and safeguards

Modern stock markets are heavily regulated, largely as a result of past crashes. After the 1929 crash, the United States created the Securities and Exchange Commission in 1934 to police disclosure and trading. Companies with listed shares must publish regular financial reports, and trading on inside information is illegal.

Exchanges also have mechanisms to slow down panics. In the US, market-wide circuit breakers pause trading if the S&P 500 falls by set percentages within a single day. The aim is not to stop prices falling, but to give people time to think rather than react.

General information, not investment advice. This article explains how stock markets work. It is not investment advice and takes no position on whether anyone should buy, hold or sell any share or fund. Share prices can fall as well as rise, and you can lose money. Rules and products differ by country. Consider speaking to a qualified, regulated adviser before making investment decisions.

The stock market is not the economy

It is easy to treat the stock market as a scoreboard for the whole economy. It is not. It reflects expectations about the future profits of listed companies, which are a subset of the economy, often dominated by a small number of very large firms.

That is why share prices can rise while unemployment is high, or fall while the economy is growing. The market looks ahead, reacts to interest rates and sentiment, and measures something narrower than most headlines suggest.

Why market vocabulary is worth learning properly

Markets come wrapped in jargon that makes simple mechanisms sound mysterious. Once the vocabulary is familiar, bid and ask, primary and secondary, index and fund, most financial news becomes much easier to read.

Astra Trainer is built to make that vocabulary stick. Quizzes follow each topic and each course ends with a ten-question final exam, while daily quests, points and a streak keep five-minute lessons going. A Circle gives you a small group with a shared weekly goal and live sessions, which helps with subjects easier to understand by talking them through.

What to take from this

The stock market is a set of places where shares are traded. Companies raise money when they first sell shares; after that, investors trade with one another.

The system is old: Amsterdam in 1602, New York's Buttonwood Agreement in 1792. The mechanism is simple: bids and asks meeting in an order book.

Prices move when the balance of buyers and sellers shifts, usually because expectations have changed, and sometimes because the crowd has run ahead of the facts.

Which is why the most useful answer to how does the stock market work is plain: it is an auction that never stops, and the price on the screen is only the last point at which two sides agreed.

Test yourself

Question 1 of 3

A stock's highest bid is $50.00 and its lowest ask is $50.10. An investor places a market order to buy. How does the article say it is filled?

Frequently asked questions
How does the stock market work for beginners?

Companies sell shares to raise money, usually through an initial public offering. After that, investors buy and sell those shares with each other on exchanges. Each trade matches a buyer's bid with a seller's asking price, and the last agreed price is the price shown.

What was the first stock exchange?

The first regular public market in shares grew up in Amsterdam after the Dutch East India Company was founded in 1602 and its transferable shares began to trade. In New York, the Buttonwood Agreement of 1792 is regarded as the origin of the New York Stock Exchange.

Why do stock prices go up and down?

Prices move when the balance of buy and sell orders changes, usually because investors' expectations about a company's future profits and risks change. Interest rates, economic news and crowd psychology also play a part.

Does a company get money when I buy its shares?

Usually not. The company receives money only when it sells new shares, as in an initial public offering. Most trading is between investors, so when you buy a share on an exchange you are buying it from another investor.

Where can I learn how markets work in short lessons?

The Markets direction inside the Business & Finance world of Astra Trainer runs to eighteen courses, including Basics in Markets, Global Market Ecosystem and Stocks, in five-minute lessons with quizzes. The first lesson needs no card.

Where this leads. How to Get Better With Money: The Order to Learn It explains which money concepts to learn before markets, and why the order matters.

Learn how the market actually works
Markets is one of five directions in the Business & Finance world, alongside Money Systems, Structures, Crypto and Trusts. Ninety-five courses in total, included in one pass that also opens the other six worlds. Pass the final exam and claim a verified certificate with your name on it.
Written by Aleksandr Steinwand
Founder, Astra Trainer · Published · Updated

From the Astra Trainer library

All 131 books
Continue reading

In the app

Markets

See the courses