📘 CodingMarble Learn

The Stock Market: How Shares Are Bought and Sold

A share is a small piece of ownership in a company. A company raises money by selling new shares in an IPO (primary market). After that, investors trade shares with each other on a stock exchange (secondary market) through brokers; shares are held in demat accounts at a depository, and a regulator such as SEBI or the SEC protects investors. The price is set by buy and sell orders meeting in the order book: more buyers push it up, more sellers push it down. An index (Nifty 50, S&P 500, WIG20) tracks a basket of big companies. Investors can also buy bonds, treasury bills and fund units. Shares are risky, so diversify, think long term and avoid behavioural traps such as herd behaviour, panic selling and overconfidence.

🎬 Step-by-step story

  1. A company sells new shares to the public. This is an IPO.
  2. Later, investors buy and sell shares to each other on a stock exchange.
  3. Buy orders meet sell orders. Where they meet, a trade happens: that is the price.
  4. An index is one number for a basket of big companies.
  5. Do not put all your money in one share. Spread the risk.
  6. Free play: change the number of buyers. Watch the price move.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Where does my money go when I buy a share on the exchange?

To the investor who sold it, not to the company (unless it is an IPO). Step 2 shows the coin moving to the seller.

Why did the company sell shares instead of borrowing?

Shares do not need to be repaid and carry no interest; the owners share the profits instead. Step 1.

Who decides the share price?

Nobody alone. It is where buyers' and sellers' orders meet. See the bars in step 3.

If the Sensex rises, did all shares rise?

No, the index is an average of a basket; some shares can still fall. Step 4.

Is diversification a guarantee against loss?

No, but it reduces the damage from one bad company. Step 5 compares one share with five.

Why do prices change every second?

New orders arrive all the time as people react to news. Move the buyers slider in step 6.

Shares and why companies sell them

A share (also called stock or equity) is a unit of ownership in a company. If a company has 1,000 shares and you own 10, you own 1%.

Shareholders can earn in two ways:

They may also vote at the annual general meeting. Companies sell shares to raise money for growth without taking a loan.

Primary market (IPO) and secondary market

Primary market: new shares are sold for the first time. The first public sale is an IPO (initial public offering). Money goes to the company.

Secondary market: existing shares are traded between investors on a stock exchange (NSE, BSE, NYSE, Nasdaq, LSE, Warsaw Stock Exchange). The company gets no new money, but investors can easily turn shares into cash (liquidity).

Who is involved: regulators, brokers, depositories

How the price is set: orders and the index

Buyers place bids, sellers place asks. The exchange matches them in the order book. A market order trades at once at the best price; a limit order trades only at your price or better. More demand than supply → price rises; more supply → price falls.

Prices react to company profits, news, interest rates and the economy.

A stock index tracks a group of shares: Sensex, Nifty 50, S&P 500, FTSE 100, WIG20. A bull market rises for a long period; a bear market falls.

How investors choose shares

Fundamental analysis: study the business, profits, debt and ratios such as P/E (price ÷ earnings per share). Technical analysis: study price charts and trading volume. Many beginners practise with a simulated (paper) portfolio before using real money.

Instruments, funds, risk and behavioural traps

Investing alone: you pick shares and bonds yourself; cheaper, but needs time and skill. Through funds (mutual funds, ETFs, index funds): you buy units; a manager or an index spreads money over many assets. Easier diversification, but fees.

Risk and return: higher possible return comes with higher risk. Diversify across companies, sectors and asset types, and invest for the long term.

Behavioural traps

Try it

Make a paper portfolio of ₹10,000 (or €100) split across 4 companies from different sectors. Record the closing price every Friday for a month and calculate your gain or loss. Did the diversified total move less than the single most volatile share? Then use the 3D slider to see how buyers and sellers move a price.

Key formulas and definitions

Worked examples

1. A company has 50,000 shares. Riya owns 500. What percentage does she own?

500 ÷ 50,000 × 100 = 1%.

2. You buy 20 shares at ₹150 and sell at ₹180. You also got a dividend of ₹5 per share. Find total gain and return %.

Capital gain = (180 − 150) × 20 = ₹600. Dividend = 5 × 20 = ₹100. Total = ₹700. Invested = 150 × 20 = ₹3,000. Return = 700 ÷ 3,000 × 100 ≈ 23.3%.

3. A share costs €40 and earnings per share are €2.50. Find the P/E ratio. Another firm in the same industry has P/E 30. What might this suggest?

P/E = 40 ÷ 2.5 = 16. Investors pay 16 times yearly earnings. The firm with P/E 30 is more expensive relative to profits: investors expect faster growth, or it may be overpriced. P/E alone is not enough to decide.

Common mistakes

Practice quiz

1. An IPO happens in the:
2. If many more people want to buy a share than sell it, the price will usually:
3. Shares in India are held electronically in a:
4. Nifty 50 and S&P 500 are examples of:
5. Buying a share just because everyone else is buying is:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is the difference between the primary and secondary market?

In the primary market a company sells new shares and gets the money. In the secondary market investors trade existing shares with each other.

Is the stock market gambling?

Investing in good companies for the long term is owning part of real businesses that earn profits. Short-term guessing and tips can become like gambling.

Can students invest?

Rules differ by country; in many places a minor needs a guardian-run account. Students can always practise with a paper portfolio first.

Where this is taught

PolandLiceum ogólnokształcące, klasa IIIPersonal finance and financial markets
CBSE (India)Class 11Primary and Secondary Market
CBSE (India)Class 12Indian Securities Market and Trading Membership

Learn first

Learn next

Related lessons

All Economics lessons