Skip to content

← Math Further 9–12

Can Anyone Beat the Stock Market?

Topic 42 · Grades 9–12 · Compound returns, random walks, survivorship bias and diversification

What this builds on from class
In this unit 9 sections
  1. Down 50%, then up 50%
  2. The average that hides a loss
  3. Can you guess tomorrow?
  4. The tipster who is never wrong
  5. Don’t put every egg in one basket
  6. What costs do over the years
  7. So, can anyone beat the market?
  8. Questions
  9. Where to go next

At Tihar, your cousin Suman, home from Kathmandu, talks about nothing but shares. Two years ago he put Rs. 1,00,000 into one hydropower company. “The first year was terrible,” he says. “The price fell 50%. But last year it rose 50%, so I’m back where I started, and now it’s only going up. A friend in a Telegram group tells me what to buy next. He has been right eleven times in a row.”

Three claims in four sentences, and each one has a piece of mathematics hiding in it. Before reading on, test the first.

Guess first. A share falls 50% in one year and rises 50% the next. Where is Suman’s Rs. 1,00,000?

Pick an answer to see why.

Down 50%, then up 50%

A rise of 50% multiplies the money by 1.5; a fall of 50% multiplies it by 0.5. Each year’s change is a growth factor: a change of r percent multiplies the money by 1+r100 1 + \frac{r}{100} , which is less than 1 for a fall. Two years in a row multiply:

1,00,000×0.5×1.5=1,00,000×0.75=75,000. 1{,}00{,}000 \times 0.5 \times 1.5 = 1{,}00{,}000 \times 0.75 = 75{,}000.

This is the compound-interest idea of Grade 10, with one change: in a bank the rate is the same every year, and on a share it is different every year. Multiplication doesn’t care about order, so a fall then a rise lands in the same place as the rise then the fall.

The trap is that percentages up and percentages down are not opposites. To undo a fall, the price must rise by more than it fell, because it is rising from a lower floor. If a price falls by a fraction d, it is left at 1 − d of itself, and getting back needs a factor of 11−d \frac{1}{1-d} :

Fall What’s left Rise needed to get back
10% 0.90 11.1%
20% 0.80 25%
25% 0.75 33.3%
35% 0.65 53.8%
50% 0.50 100%
75% 0.25 300%
90% 0.10 900%

Small falls are nearly undone by equal rises, but big falls need enormous ones. A share that loses 90% has to multiply by ten just to get back.

The average that hides a loss

Suman might say: “My average return was zero. +50% and −50% average to 0%.” He has added the two percentages and halved them. That is the arithmetic mean return, and here it says nothing useful: his money fell by a quarter.

What would tell the truth is the steady yearly rate that gives the same result. Two years of the same factor g must make 0.75, so g2=0.75 g^2 = 0.75 and

g=0.75≈0.866. g = \sqrt{0.75} \approx 0.866.

So Suman’s money did exactly what it would have done falling 13.4% every year. A steady factor found this way is the geometric mean of the factors, and the yearly rate it gives is called the compound annual growth rate. For money, it is the only average that matters.

1 + a1 − aa1a × a missing
Figure 42.1 Why up and down always loses. Rs. 1 rising by a fraction a and falling by a becomes (1 + a)(1 − a), the area of the rectangle on the left. Cut off its shaded strip and stand it on top: it makes a 1 × 1 square with an a × a corner missing. Drawn with a = 0.3.

Is it bad luck that up-and-down lost money, or does it always? Figure 42.1 answers with a picture. Rise by a fraction a, then fall by a (or the other way round): Rs. 1 becomes (1 + a)(1 − a). That is the area of a rectangle 1 + a wide and 1 − a tall. Slice off a strip a wide from its right end; the strip is a by 1 − a. Turn it and lay it along the top of what is left, a rectangle 1 wide and 1 − a tall. The two pieces fill a 1 × 1 square except for one small corner, a by a. So

(1+a)(1−a)=1−a2, (1 + a)(1 - a) = 1 - a^2,

always less than 1. With a = 0.5, the missing corner is 0.25: Suman’s quarter. With a = 0.2, it is 0.04: the 4% of the try box. The bigger the swings, the bigger the corner, and it grows as the square of the swing.

The more the years differ, the more the arithmetic mean flatters (question f proves it for any two years). This gap is often called volatility drag: for small swings it costs about half the square of the swing each year (0.2² ÷ 2 = 2%, against the exact 2.02% for a steady ±20%).

Three years: +10%, +10%, −20%. The arithmetic mean return is 0%. What happened to the money?

Pick an answer to see why.

Can you guess tomorrow?

Now Suman’s second claim, that his share is “only going up”. People who study charts of prices look for trends, runs and shapes and use them to guess what comes next. Try it yourself: here is a share’s price for the last 40 trading days. Will it be up or down tomorrow?

Try it

Guess tomorrow’s price

Press Up or Down for each new day, 20 times, and look at your score.

420440460480500price (Rs.)days →
Guesses
0 / 20
Right
0
Score
–

Study the chart: its longest run so far is 4 days the same way. Will tomorrow be up or down?

Right! The new days are drawn in red. Guess again.

Wrong this time. The new days are drawn in red. Guess again.

20 guesses done. Compare your score with everyone else’s: most land between 30% and 70%. Press New share to play again.

Here is the secret: this share is made by tossing a coin. Each day, heads multiplies the price by 1.02 and tails by 0.98. The history you studied, with its runs, its climbs and its slides, came from coin tosses, and so did every day you guessed. No method can beat 50% on a fair coin in the long run, so your score is luck: after 20 guesses, 96 people in 100 score between 30% and 70% just by guessing (fewer than 6 right, or more than 14, happens about 2% of the time each).

A path made by adding a random step at each turn is a random walk. The coin share is one, and the surprise is how un-random it looks. In 250 coin tosses, about a year of trading days, the longest run of tosses landing the same way is about 8 on average, and a run of at least 7 turns up in 87% of years. A run of seven “up” days looks like a trend to anyone, but it means nothing about the eighth day.

How far does a random walk wander? After n steps of size 1, it is typically about n \sqrt{n} steps from its start. With 250 daily steps of 1%, 250≈16 \sqrt{250} \approx 16 : a coin share usually ends a year somewhere within about 16% either side of its start, and in 95 years out of 100 between about −27% and +33%.

Why real prices behave like coins

Why should real prices look like a coin? Suppose a pattern really did predict that a share would rise tomorrow. Then everyone who saw the pattern would buy it today, and their buying would push today’s price up until the rise was already in it. A pattern that can be seen tends to be used up by the people trading on it. What is left to move the price is news nobody knew yet, and news, by its nature, can’t be guessed from yesterday’s chart. This is the random walk hypothesis: past prices don’t tell you which way the next one goes.

The tipster who is never wrong

Suman’s friend has been right eleven times in a row. Surely that can’t be luck?

Try a contest. 1,024 tipsters each say, every week, whether the market will go up or down, and each one decides by tossing a coin. Watch how many keep a perfect record.

Try it

1,024 tipsters with coins

Press Next week and watch the bright dots, the tipsters who have never been wrong. The last readout is how many perfect records chance alone should leave.

Week
0
Perfect records
1,024
Expected by chance
1,024

Each dot is a tipster who tosses a coin to say “up” or “down”. Press Next week.

About half of the perfect records end each week. Keep going.

The bright dots have never been wrong. Each could sell a course on how they do it.

Only a few perfect records are left, every one made by tossing a coin. Ask one of them for next week’s tip.

Every record has ended. Press Start again: next time a different tipster may be the star.

Right again, this time. The chance was still 1 in 2: a long record doesn’t change the coin.

Wrong this time. The chance was always 1 in 2: a long record doesn’t change the coin.

Each week, about half of the perfect records end, so after w weeks about 1024÷2w 1024 \div 2^w are left: 512, 256, 128, … and after 10 weeks, about 1. That last tipster has a record that looks like genius, ten right out of ten, a chance of 1 in 1,024 for any one tipster. But with 1,024 people tossing, someone is expected to get there, and the chance that at least one does is about 63%. And when you ask the champion for next week’s tip, the coin is still a coin: the chance is still 1 in 2.

You never hear about the 1,023 who missed. Groups that stopped being right go quiet; the one still right gets the followers. Judging by the survivors alone, while those who dropped out are invisible, is survivorship bias.

The same bias hides in tables of funds, which pool many people’s money and choose shares for it. Funds that do badly are often closed or merged into others and vanish from the lists of past results. S&P Dow Jones Indices, which keeps careful score in the United States, counts the funds that were closed too. Of 774 US funds investing in large companies at the start of 2005, only about a third, 255, still existed at the end of 2024. And over those 20 years, 92% of all of them did worse than the S&P 500, the simple list of 500 big companies they were trying to beat (as of the report for 2024).

Don’t put every egg in one basket

So nobody can see tomorrow. Is there anything maths can do for an investor? Yes: it can show how to lose less to bad luck.

Imagine a coin company. Each year, a coin decides whether its share rises 60% or falls 40%. The arithmetic mean return is 60−402=10% \frac{60 - 40}{2} = 10\% a year, which sounds wonderful. But a good year and a bad year multiply to 1.6 × 0.6 = 0.96: the compound rate is 0.96−1≈−2% \sqrt{0.96} - 1 \approx -2\% a year. Over 20 years, a typical investor gets 10 good years and 10 bad, and Rs. 1,00,000 becomes 1,00,000×0.9610≈ 1{,}00{,}000 \times 0.96^{10} \approx Rs. 66,483. A few lucky ones become extremely rich, enough to make the average of everyone’s money 1.1²⁰ times the start, Rs. 6,72,750. The average investor is rich; the typical investor has lost a third. (Grades 6–8’s “What Does an Average Hide?” meets this gap from another side.)

Now hold two coin companies whose coins are tossed separately, with half the money in each, and split the money half and half again at the start of each year. Each year one of four things happens, each with chance 1 in 4: both rise (× 1.6), both fall (× 0.6), or one rises and one falls (half at 1.6 and half at 0.6, × 1.1 in all), the last in two ways. Over four typical years:

1.6×0.6×1.1×1.1=1.1616, 1.6 \times 0.6 \times 1.1 \times 1.1 = 1.1616,

a compound rate of about +3.8% a year instead of −2%. Nothing about either company changed. Spreading the money made the swings smaller, and the up-and-down loss of Figure 42.1 grows with the square of the swings. Spreading money over many investments is diversification.

Try it

Spread the money

Each blue line is one investor’s Rs. 1,00,000 over 20 years, spread equally over the companies you choose; the red dashed line is the Rs. 1 lakh they started with. Change the number of companies, then let the companies move partly together.

1,00010,0001 lakh10 lakh1 crore05101520years
Companies:
Typical investor after 20 years
Rs. 66,000
Investors who lost money
60%

One company: a few investors get rich, but most end with less than the Rs. 1 lakh they started with.

Two companies: the bad years are softened, and the typical investor now ends with about twice the start.

Many companies, each on its own: the lines bunch together, and almost nobody loses.

When the companies partly move together, two of them help less: their bad years often come together.

More companies remove each one’s own luck, but not the market’s: the lines stay spread, and some still lose.

With many companies, each on its own, the lines bunch together, and the typical investor gets close to the 10% a year that a single company only promised: Rs. 1,00,000 typically grows to Rs. 5 to 6 lakh with 10 companies and about Rs. 6.6 lakh with 100.

Now the twist. In a real market, companies don’t toss separate coins. When the whole market falls, as NEPSE did in 2021–22, nearly every share falls with it. Switch the widget to partly together: each company now follows a coin shared by all of them half the time. More companies still help, but only up to a point: even with 100, about a tenth of the investors lose money, and the typical result stays near Rs. 3.8 lakh. Diversification removes each company’s own luck. It cannot remove the luck everyone shares, the market risk.

A friend owns shares in ten hydropower companies and says he is “fully diversified”. What is the weakness?

Pick an answer to see why.

What costs do over the years

One more number every investor meets is the only one they control: costs. As of 2026, the commission in Nepal is 0.36% on a trade between Rs. 2,501 and Rs. 50,000, SEBON adds 0.015%, and selling costs a fixed Rs. 25 more for the depository. Buy Rs. 20,000 of shares and sell them at the same price: Rs. 75 to buy and Rs. 100 to sell, Rs. 175, or 0.875% of the money, before any tax on profit.

That seems small. But costs compound, just as gains do, and they never have a bad year. Someone who buys and sells their whole Rs. 20,000 once a month keeps (1−0.00875)12≈0.90 (1 - 0.00875)^{12} \approx 0.90 of it a year from costs alone: they must beat the market by about 11% a year (1 ÷ 0.90 ≈ 1.11) just to stand still against someone who bought once and waited. Trade every week and the factor is 0.9912552≈0.63 0.99125^{52} \approx 0.63 : over a third gone in a year.

Yearly fees do the same thing slowly. A fund that charges a fee each year takes it from the growth. Suppose the shares themselves grow 10% a year for 30 years (our own example, not a promise):

Kept each year after fees Rs. 1,00,000 after 30 years
10% (no fee) Rs. 17,44,940
9% (a 1% fee) Rs. 13,26,768
8% (a 2% fee) Rs. 10,06,266

A “small” 1% fee takes almost a quarter of the final amount (1.09³⁰ ÷ 1.10³⁰ = 0.76), and 2% takes over 40%. The fee is charged on everything, the gains of earlier years included, so its share of the end grows every year.

Why the average investor can’t beat the market

The economist William Sharpe put the last piece in place in 1991, in a short paper called “The Arithmetic of Active Management”, with nothing but adding up. Split all the money in a market into two kinds: passive money, which simply owns a little of every share in proportion (and so earns exactly the market’s return), and active money, which picks and chooses, hoping to beat it. Together the two own the whole market, so together they earn its return. Take away the passive part, which earns exactly that, and the active part, taken all together, must earn it too: for every active rupee that beat the market, other active rupees did worse by the same amount.

That is before costs. Active money trades more and pays more for advice, so Sharpe’s two statements are: before costs, “the return on the average actively managed dollar will equal the return on the average passively managed dollar”, and after costs, it “will be less”. It isn’t a fact about markets that might change one day; it is arithmetic.

So, can anyone beat the market?

In any year many people do; with enough people trying, some must, by luck alone. What the maths on this page says is how to read their claims:

  • A record means little until you know how many tried, and how many dropped out of sight.
  • A chart’s patterns predict nothing by themselves: coin tosses make them too.
  • Up and down loses, by the square of the swing, so the arithmetic mean flatters.
  • Spreading money cuts each company’s own luck, though not the market’s.
  • Costs are certain and compound, and on average everyone’s picking earns the market’s return before costs, and less after.

The practical side, what a share is, how an account works, the IPO lottery, what trades cost, and why never to borrow for shares, is in Personal Finance 101 on this site.

Questions

a.★

A share falls 40%. i. By what percentage must it now rise to get back to its old price? ii. Another share rises 40% and then falls 40%. Overall, by what percentage has it changed?

Answer

A share doubles one year and halves the next, again and again. What are its arithmetic mean return and its compound annual growth rate?

Pick an answer to see why.

c.★★

A Telegram group starts with 10,000 members. Its owner secretly splits them in half each week, telling one half “up” and the other “down”, and keeps only those who got the right message. i. How many members have seen six right predictions in a row after six weeks? ii. If instead 1,024 honest tipsters toss coins for 10 weeks, how many do you expect to be right at least 9 times out of 10?

Hint
Answer
d.★★

Two funds hold the same shares, which grow 9% a year before fees. Fund A charges no fee; Fund B charges 2% a year, so its investors keep 7%. After 30 years, how many times as much does Fund A’s investor have?

Answer
e.★★

Rs. 1,00,000 is split equally between two coin companies (each year +60% or −40%, tossed separately) and split equally again each year. Show that in a year when one rises and one falls, the money is multiplied by 1.1. Then explain in words why the two together grow over the years while each alone shrinks.

Answer
f.★★★

Prove that for any two years with growth factors 1 + x and 1 + y (each above 0), the money after both is never more than after two years at the arithmetic mean rate m=x+y2 m = \frac{x + y}{2} . When are they equal?

Hint
Answer

Where to go next

Where these facts come from