How Markets Work
Why lemonade costs more on a hot day, why two friends both win by trading, why a rival stand cuts your profit, why whole economies boom and bust, and why the stock market sometimes acts like a moody neighbour.
Supply and demand 🍋
A market price is where the number of glasses people want to buy meets the number sellers want to sell.
Demand: the cheaper the lemonade, the more glasses people want. Supply: the higher the price, the more glasses Sunny is willing to squeeze, because each extra glass is worth the effort. Drag the price and watch what happens.
Set the price of a glass
Made-up numbers for teaching. Blue line: how many glasses people want at each price. Gold line: how many Sunny will make.
Real life: tomatoes in 2023. NABARD, India's farm-development bank, reported that retail tomato prices roughly tripled in July 2023, from about ₹30 a kilo in June to ₹109 by the end of July. July and August are always a lean season for tomatoes, and that year heat and heavy rain also damaged crops. On 2 August the government's own price tracker showed ₹203 a kilo in Delhi. That is a supply shift: same appetite for tomatoes, far fewer tomatoes.
⚡ Pop quiz
Opportunity cost and why trade helps
The real cost of anything is the best thing you gave up to get it.
If Sunny spends Saturday at the cinema, the cost is not just the ticket. It is also the lemonade profit Sunny would have made that afternoon. Economists call that the opportunity cost.
Opportunity cost explains one of the most surprising ideas in economics. In one hour, Sunny can make 20 glasses or 10 cookies. Pip can make 6 glasses or 6 cookies. Sunny is better at both. Should Sunny do everything?
Plan the day: 8 hours each
Without a plan, each spends 4 hours on lemonade and 4 on cookies: 104 glasses and 64 cookies in all. Can you beat that on both?
This is comparative advantage. Each person should do the job where their opportunity cost is lowest, then trade. The economist David Ricardo explained it in 1817 with England, Portugal, cloth and wine: even if one country is better at making everything, both can end up with more by specialising and trading. It is why India sells software services and buys oil, and why most of us buy our bread instead of baking it.
⚡ Pop quiz
Competition and moats 🏰
Rivals push prices down towards cost. A "moat" is whatever stops them.
Each glass costs Sunny ₹5 in lemons, sugar and cups, plus ₹100 a day for the stall. Charge too little and there is no margin; charge too much and customers walk away. Find the most profitable price, then see what a rival does to it.
🎮 Pick your price
A made-up model for teaching: people buy 200 − 10 × price glasses a day; with a rival, your share depends on how your price compares with theirs.
Warren Buffett calls a lasting advantage a moat, like the water around a castle: a brand people trust, a secret recipe, the best spot on the street, or customers who find it a pain to switch. In the game, the secret recipe lets Sunny charge more than the rival and still keep customers. Investors look for moats because without one, competition slowly eats the profit away. See Buffett's page in the investors library.
⚡ Pop quiz
Booms and busts
Economies do not grow in a straight line. They speed up, slow down and sometimes shrink.
The business cycle
In a boom, shops are busy, firms hire and borrow, and prices tend to rise. At the peak things overheat. In a recession, the economy produces less than the year before: sales fall, firms cut jobs and people spend less. Then comes the trough, and the recovery. A common rule of thumb calls two quarters in a row of shrinking output a recession. In America, a committee of economists makes the official call.
Real growth every year: India and America, 1975 to 2025
Below the zero line, the economy shrank. India shrank in only two of these 51 years; America in six. Over the whole period India's economy grew about 17 times in real terms (about 5.8% a year), America's about 4 times (about 2.7% a year).
Real GDP growth, after inflation. India: World Bank, calendar years (our calculation from World Bank GDP per person in constant dollars and population, which matches the World Bank's published growth rates). United States: Bureau of Economic Analysis. Both via FRED. Touch and drag to read any year.
Remember the lever from Part 3: in a bust, central banks usually cut interest rates to make borrowing cheaper and get spending going again. In a boom they raise rates to cool things down.
⚡ Pop quiz
The stock market and Mr. Market 📈
A share is a small slice of a business. Its price is set, second by second, by supply and demand.
Suppose Sunny's stand makes about ₹1,000 profit a year, and a sensible price for the whole stand is about ₹10,000. If Sunny sold it on a stock market, the price would move every day with the mood of buyers and sellers, even when nothing about the stand had changed.
Benjamin Graham, Buffett's teacher, described the market as a business partner called Mr. Market. Every day he offers to buy your share or sell you his. Some days he is gloomy and offers a silly low price; some days he is excited and offers a silly high one. You do not have to trade with him. You can wait for a good offer. See Graham's page.
🎮 Deal with Mr. Market
The stand is worth about ₹10,000. Buy when he is cheap, sell when he is dear, otherwise wait.
When the mood goes too far: bubbles
A bubble is when prices rise far above what the businesses are worth, because people buy simply because prices are rising. When the mood turns, prices can fall a long way.
2000–2002
2008–2009
Graham's lesson: over short periods the market behaves like a vote on what is popular; over long periods it works more like a scale that weighs what businesses actually earn. The great investors in the library mostly got rich by keeping calm when Mr. Market did not.
⚡ Pop quiz
🧩 Puzzles
Type a number and press Check.
📝 Take-home assignment
Tick them off as you go (your ticks stay on this phone).
🏁 Final test
Ten questions on the whole page. Aim for 8 or more.
Test yourself
📖 Grown-up words
| Demand | How much people want to buy at each price |
| Supply | How much sellers want to sell at each price |
| Equilibrium (market) price | The price where the amount wanted equals the amount offered |
| Shortage / surplus | Too little or too much on offer at the current price |
| Opportunity cost | The best thing you give up when you choose something |
| Comparative advantage | Being able to do something at a lower opportunity cost than others |
| Margin | What is left from each sale after paying for what went into it |
| Moat | A lasting advantage that keeps rivals from taking a business's profits |
| Recession | A period when the economy produces less than before |
| Bubble | Prices rising far above value because people expect them to keep rising |
🎓 You finished the Economics course
Four parts, from one lemonade stand to the whole world: the three money reports, the world economy, money and prices, and now how markets work. Next, see how the great investors used these ideas.
Questions people ask
What is supply and demand, in simple words?
Demand is how much people want to buy at each price; supply is how much sellers want to sell. The market price settles where the two are equal. If the price is too high, goods are left over; too low, and there is a queue.
What is opportunity cost?
The best thing you give up when you choose something. An hour spent baking cookies costs you whatever else you could have made or done in that hour.
What is comparative advantage?
Being able to do something at a lower opportunity cost than someone else. David Ricardo showed in 1817 that two countries can both gain by specialising and trading, even if one is better at making everything.
What is a moat in investing?
A lasting advantage, such as a trusted brand or a cost edge, that stops rivals from competing away a company's profits. Warren Buffett made the term popular.
What is a recession?
A period when an economy produces less than before. India's economy shrank in 1979 and 2020; America's in six years between 1975 and 2025, including 2009 and 2020.
Who is Mr. Market?
A character invented by the investor Benjamin Graham. He stands for the stock market's mood swings: some days he offers silly low prices, some days silly high ones, and you are free to ignore him.
Sources and further reading
- NABARD, "Spiralling Tomato Prices: Issues and Concerns" (August 2023): retail prices from about ₹30 a kilo in June to ₹109 by end-July 2023. Press Trust of India via Deccan Herald (2 August 2023): Department of Consumer Affairs retail price of ₹203 a kilo in Delhi.
- David Ricardo, On the Principles of Political Economy and Taxation (1817): comparative advantage, with England, Portugal, cloth and wine.
- World Bank GDP per person in constant US dollars for India (FRED series NYGDPPCAPKDIND) and World Bank population (via the open "datasets/population" collection); growth is our calculation and matches the World Bank's published growth figures. US Bureau of Economic Analysis real GDP growth (FRED series A191RL1A225NBEA).
- Reuters, Fortune and NPR (23 April 2015): the Nasdaq's 10 March 2000 record close of 5,048.62, the October 2002 low of 1,114.11 and the new record close in April 2015.
- BSE Sensex history (Wikipedia, Business Standard, March 2009): the 8 January 2008 close of 20,873, the March 2009 low near 8,160, and the first close above 21,000 in November 2010.
- Benjamin Graham, The Intelligent Investor (1949): the Mr. Market parable. Warren Buffett's shareholder letters: the idea of an economic moat.
- The supply-and-demand lines, the cookie example, the pricing game and the Mr. Market game are made-up teaching models.
For education only. Not investment, financial, legal or tax advice, and not a recommendation to buy, sell or hold any security. The games are simplified teaching models, not forecasts. Past market falls and recoveries do not predict future ones. Figures may be revised and may contain errors; no warranty is given and no liability is accepted for any loss from using this page.
An independent, non-commercial project. Not affiliated with or endorsed by NABARD, the World Bank, the US Bureau of Economic Analysis, Nasdaq, BSE, or any person or organisation named. All trademarks belong to their owners.
alienspacex.com · The Alien's Guide to Earth