The random walk: a real chart or a coin flip?

Market efficiency and behavior
Can I tell a real price chart from a coin-flip chart, and if I cannot, what does that prove about predicting prices?

Learning goals

After this page, you can:

  • Explain the random-walk idea in one sentence, and connect it to the weak form of the efficient markets hypothesis.
  • Test it on daily prices with two numbers: the autocorrelation of the returns, and the share of up days after an up day and after a down day.
  • Compute an abnormal return, and say what a jump on the news day followed by a flat line means.
  • Name the classic anomalies, and explain why an anomaly shrinks after it is published.

The idea

A friend shows you four price charts. One is the real stock market this year. Three come from a coin-flipping program. One looks “too jumpy to be real”. One “has an obvious trend”. You pick one. About one person in four picks right, and that is the same as guessing. If you cannot see the difference, there is no pattern to trade on.

The random walk. A random walk is a price series in which yesterday’s move carries no information about today’s move. Up yesterday does not make up today more likely. Down yesterday does not make a bounce more likely.

In an efficient market, new information goes into the price quickly and fully. The next move waits for the next piece of news, and nobody knows that news yet. This is the weak form of the efficient markets hypothesis: past prices are already in today’s price, so a chart of old prices gives no edge.

Test it with two numbers. Start with the daily return: today’s closing price divided by yesterday’s, minus one.

  1. Autocorrelation is the correlation of each day’s return with the return of the day before. A number near zero means that yesterday tells you nothing about today.
  2. Up after up, up after down. Of all the days that follow an up day, what share went up? Ask the same about the days that follow a down day. Two shares near 50%, and close to each other, mean that direction does not repeat.
Key formulas

daily return = today’s close ÷ yesterday’s close − 1

autocorrelation = correlation of (today’s return, yesterday’s return)

share of up days after an up day = (up after up) ÷ (up after up + down after up)

abnormal return = actual return − beta × market return

A day with a return of exactly zero counts as “not up”.

In Excel. Put the closes in column B, starting in B2. Return: =B3/B2-1 in C3, copied down. With five returns in C3:C7, the autocorrelation is =CORREL(C4:C7,C3:C6): two ranges of the same length, shifted by one row. Count of up after up: =SUMPRODUCT((C4:C7>0)*(C3:C6>0)). Swap >0 and <=0 for the other three counts.

Abnormal return. The abnormal return is the actual return minus the expected return. For one day, the expected return is the stock’s beta (how strongly it moves with the market) times the market’s return. The one-day risk-free rate is treated as zero. In an efficient market the abnormal return jumps on the day of the news and is about zero afterwards. If the price keeps drifting for weeks, the market was slow.

Anomalies. An anomaly is a pattern in old data that looks like extra return for nothing. The classic ones:

  • the calendar effect, such as the January effect: small stocks did unusually well in January;
  • the small-firm effect: small companies earned extra return;
  • earnings drift: prices kept moving for weeks after earnings news;
  • momentum: recent winners kept winning for a few months;
  • the value effect: stocks with a low price-to-earnings ratio (price ÷ earnings per share) beat stocks with a high one.

Once a pattern is published, investors trade on it. Their trading moves the price earlier, and the extra return shrinks. A known pattern is a pattern that has already been traded.

Try it

Pick the line you think is real, then press Reveal. The line numbers are shuffled every time the page loads.

What to notice:

  • After the reveal, read the autocorrelation column. The real line’s number is the closest to zero, but the three coin-flip numbers are small too. Chance alone gives values between about −0.15 and +0.15.
  • On the real line, “up after an up day” and “up after a down day” are both near 50%.
  • Nothing in the two tables separates the real line from the coin flips. That is the finding.

Worked example

Six daily closes of Lanternfish Foods: 40.00, 40.80, 40.39, 41.20, 40.79, 41.61.

Step 1. Daily returns.

Day Daily return
2 40.80 ÷ 40.00 − 1 = +2.000%
3 40.39 ÷ 40.80 − 1 = −1.005%
4 41.20 ÷ 40.39 − 1 = +2.005%
5 40.79 ÷ 41.20 − 1 = −0.995%
6 41.61 ÷ 40.79 − 1 = +2.010%

Step 2. Pairs (yesterday, today). (+2.000, −1.005), (−1.005, +2.005), (+2.005, −0.995), (−0.995, +2.010). Every up day is followed by a down day, and every down day by an up day. Up after up: 0 of 2 = 0%. Up after down: 2 of 2 = 100%. The correlation of today’s return with yesterday’s is −1.00.

Step 3. Read it. This series is not a random walk. Yesterday predicts today perfectly, and a trader could buy after every down day. Real markets do not look like this. On the real S&P 500 fund in the tool above (course data: prices Jan 2–Aug 31, 2026), up after up is 51.72%, up after down is 53.25%, and the autocorrelation is −0.03.

Step 4. An abnormal return. A stock returns +4.5% on the day it announces a buyout. The market returns −0.5%, and the stock’s beta is 1.2. Expected return = 1.2 × (−0.5%) = −0.6%. Abnormal return = 4.5% − (−0.6%) = +5.1%. Over the next five days the abnormal return is about zero: the market priced the news in one day.

Answer. The zig-zag series has an autocorrelation of about −1, with 0% up after up and 100% up after down: it is predictable, so it is not a random walk. The buyout stock’s abnormal return is +5.1% on the news day, and then nothing.

Check yourself

Check 1.

A stock’s daily returns have a correlation of −0.02 between today’s return and yesterday’s. What does this say?

Autocorrelation near zero = yesterday tells you nothing about today.

Check 2.

On a long daily series, 50.9 % of the days after an up day were up, and 50.4 % of the days after a down day were up. A trader proposes ‘buy after every up day’. The best reply is:

Up-after-up ≈ up-after-down ≈ 50 % means past direction does not predict tomorrow’s direction.

Check 3.

Which statement describes the WEAK form of the efficient markets hypothesis?

Weak = past prices; semi-strong = all public information; strong = everything.

Check 4.

On the morning a company announces a takeover offer, its stock jumps 22 % in the first minutes and then stays flat for the next two weeks. This pattern is:

Efficient reaction = jump on the news, then no drift.

Check 5.

Thirty years ago researchers found that stocks with very low price-to-earnings ratios earned higher returns than expected. Which statement about this ‘value effect’ fits the efficient-market view?

Anomalies are either payment for risk or profits that competition removes.

Video

Video coming soon.