Blog

Does Shannon's Demon Make Money? Testing Rebalancing on 100 Years of US Stocks and 36 Years of Japanese Stocks

Keeping a portfolio half in stocks and half in cash, the trick known as Shannon's Demon, can make money even from an asset that goes nowhere. Yet on daily US stock data since 1926 it returned 7.13% a year against 10.26% for buy and hold. In Japan after the bubble burst it did win, only to lose to plain cash. The extra return from rebalancing was about 0.4% a year, just as theory predicts.

Log-scale chart of portfolio value from 1926 to 2026 for US stocks. The orange buy-and-hold line ends far above the blue Shannon's Demon line
$1 million invested in US stocks (dividends reinvested) in July 1926. Shannon's Demon (50% stocks, 50% cash, rebalanced monthly) grew to $998.92 million; holding the full amount grew to $17.96 billion.
Contents

Suppose you own a stock that, over time, neither rises nor falls. Add one rule: keep half of your money in the stock and half in cash, and whenever the stock rises and its share grows, sell some; whenever it falls, buy more, so the split always returns to 50/50. That rule alone is enough to make your money grow. Claude Shannon, the founder of information theory, is said to have told this story in a lecture at MIT in the 1960s (as recounted in William Poundstone’s Fortune’s Formula), and the idea is sometimes called “Shannon’s Demon”.

If it really made money, anyone could start doing it today. So I built an investment strategy backtest and tried it on about 100 years of daily US stock data and about 36 years of Japanese stock data. In one sentence: the demon is real, but much smaller than you might hope.

How an asset that goes nowhere can still make money

In Shannon’s example, the stock price is set by a coin flip each time: heads, it doubles; tails, it halves. One heads and one tails bring it back to the starting price, because doubling and then halving cancels out. Someone who simply holds the stock gains nothing if heads and tails come up equally often, no matter how many times the coin is flipped.

The 50/50 investor is different. Start with $1 million: $500,000 in the stock and $500,000 in cash. Heads: the stock becomes $1 million and the portfolio $1.5 million. Now split it back to $750,000 each. Tails: the stock drops to $375,000 and the portfolio is $1.125 million. After just one heads and one tails, the portfolio has grown 1.5 × 0.75 = 1.125 times, or 12.5%. By mechanically selling after rises and buying after falls, the “round trips” of the price are turned into profit.

But the gain is not magic. On each flip this stock’s expected value is (2 + 0.5) ÷ 2 = 1.25 times, so on average it is an asset that rises sharply. The expected wealth of someone who just holds it rises too, but when you keep multiplying by 2 and by one half, a tiny number of people who happened to get far more heads pull the average up, while most people are left near where they started. The 50/50 rule turns part of that high expected value into something most people actually receive. Written as a formula, the extra annual return from rebalancing is roughly “share of the stock × (1 − share of the stock) × (volatility, the annual standard deviation)² ÷ 2”. With 50% in the stock, that is “standard deviation squared ÷ 8”.

Checking it with a coin flip

In the tool, choosing “Thought experiment: a coin flip that doubles or halves” as the asset, “Shannon’s Demon” as the strategy and “Daily” for rebalancing reproduces this example exactly. The coin is flipped once a week, 100 times, and the initial amount is 1,000,000 units. Changing the random seed changes the sequence of heads and tails.

Random seed Heads Buy and hold Shannon’s Demon
1 53 64 million (64×) 2.89 billion (2,889×)
2 49 250,000 (one quarter) 180 million (180×)
3 40 almost 0 350,000 (about one third)

The buy-and-hold result depends only on the difference between the number of heads and tails. Seed 1 has six more heads, so it ends at 2 to the 6th power, 64 times; seed 2 has two more tails, so it ends at one quarter. The demon grows by orders of magnitude in both cases. With seed 3, however, where heads came up only 40 times, even the demon shrank to a third of its starting amount. Multiplying by 1.5 and 0.75 still loses if tails keep coming. It does not “make money from any price path”; more precisely, it is strong when prices swing widely and keep going back and forth.

The stock in this experiment moves with an unrealistic violence, doubling or halving on every flip. Because the demon’s extra return grows with the square of volatility, the wilder the moves, the bigger it gets. Real stock indexes move by about 15–20% a year, nothing like the coin.

Result of comparing Shannon's Demon and buy and hold on the coin-flip asset. The blue line zigzags but trends upward, while the orange line swings wildly and ends below the blue line
Result for random seed 1. The coin came up heads 53 times and tails 47 times; buy and hold grew 64 times and Shannon's Demon 2,889 times.

Testing it on 100 years of US stocks

The real test is actual market data. Choosing “US stocks (total market, dividends reinvested)” in the tool lets you calculate with daily data from July 1, 1926 to September 30, 2026. The strategy is Shannon’s Demon (50% stocks, restored to 50/50 on the first trading day of each month), cash earns the US short-term Treasury rate, the initial amount is $1 million, and there are no trading costs or taxes.

Annualized return Final value Annualized volatility Maximum drawdown
Buy and hold (full amount) 10.26% $17.96 billion 17.48% −84.07%
Shannon’s Demon (cash earns interest) 7.13% $998.92 million 8.61% −56.18%
Shannon’s Demon (cash at 0%) 5.47% $208 million — —

Buy and hold wins by a mile. Over 100 years the gap grew to 18 times.

Even so, the demon was not absent. If rebalancing had no effect at all, the annualized return of someone holding half stocks and half cash would sit roughly in the middle of the two, that is, around 6.73%, the average of stocks at 10.26% and cash at 3.19%. The actual figure is 7.13%, 0.40 percentage points higher. US stocks over this period had annual volatility of 17.48%, so the formula above gives an extra return of 0.25 × 0.1748² ÷ 2 ≈ 0.38%. That matches the theoretical prediction almost exactly.

In other words, the demon earned its theoretical extra 0.4% or so, every year. The problem is that, in exchange, half of the money is kept out of stocks. Over 100 years US stocks returned about 7% a year more than cash. Giving up half of that, about 3.5% a year, to pick up 0.4% leaves a large net loss.

Charts of portfolio value and drawdown for US stocks from 1926. Buy and hold fell more than 80% in the Great Depression, while Shannon's Demon fell only 56%
The drawdown chart below (decline from the previous peak) shows that the demon fell less and recovered sooner, even in the Great Depression.

Did it lose no matter when you started?

The 100-year total might be a fluke. So I repeated the same calculation for 5-, 10-, 20- and 30-year periods, shifting the start date one month at a time from July 1926. Here is how often the demon beat buy and hold.

Holding period Start months tested Demon won Gap in annualized return (median)
5 years 1,143 22.7% −3.42 pts
10 years 1,083 15.9% −3.12 pts
20 years 963 0.9% −2.85 pts
30 years 843 0% −2.82 pts

Over 10 years, the demon wins about one time in six. A typical case is 2000 to the end of 2012, when the dot-com crash and the 2008 financial crisis came one after the other and stocks went sideways. Pressing “US flat decade 2000–2012” in the tool shows the demon at 2.60% a year and buy and hold at 2.21%. Beyond 20 years, though, the demon almost never wins, because the longer you hold, the more the gap between stocks and cash piles up.

Could it win in Japan after the bubble burst?

If losing in a market that kept rising is only to be expected, what about a market that fell and did not come back? Japanese stocks make an ideal test. In the late 1980s, Japan’s stock and real-estate prices rose to extraordinary heights; the Nikkei 225 peaked at the end of 1989 and then fell for years. The two decades of weak growth that followed are often called Japan’s “lost decades”. Set the asset to “Japanese stocks (total market, dividends reinvested)” and press “Japan’s lost decades 1990–2012”. The bundled Japanese stock data starts on July 2, 1990, so the calculation starts half a year after the Nikkei 225’s peak.

July 1990 – November 2012 Annualized return Final value from ¥1 million
Buy and hold (full amount) −3.60% ¥440,000
Shannon’s Demon −0.78% ¥839,000
Cash only (short-term rate) +1.10% ¥1,276,000

Here, for the first time, the demon clearly wins. Buy and hold lost more than half, while the demon held on with a 16% loss. Year by year, it lost heavily in years like 1999, when stocks rose 65%, and won by more than 10 points in 1990, 1992 and 2000, when stocks fell 20–26%. Taking only half of each decline, buying more of the fallen stock and selling it once it recovered suited a market that kept sinking while bouncing up and down.

Portfolio value for Japanese stocks from 1990 to 2012. The orange buy-and-hold line sinks to less than half, while the blue Shannon's Demon line stays a little below the starting amount
¥1 million invested in Japanese stocks (dividends reinvested, in yen) from July 1990. The demon's line stays well above buy and hold, but it still ends below the starting amount.

But look at the third row of the table. The person who did nothing and simply held cash came out best. The demon was “better than buy and hold”, but it lost money on the half it kept in stocks. If you knew from the start that prices would keep falling, you would just hold cash; if you didn’t, you had no reason to pick the demon either.

Running the same calculation for 2013 through September 2026, buy and hold now returned 14.62% a year and the demon 7.40%, turning ¥1 million into ¥6.52 million and ¥2.67 million respectively. Over the whole span from July 1990 to September 2026, buy and hold returned 3.37% a year and the demon 2.46%. The ground the demon gained during the stagnation was taken back in the rise that followed.

Counting start months the same way as for US stocks, the demon won in 38.7% of start months over 10-year periods and in 28.2% over 20-year periods in Japan. That is a much higher win rate than in the US, but still less than half.

Rebalancing frequency and costs barely matter

The demon’s weakness is not about how often it rebalances. For US stocks from 1990 onward, rebalancing every day (9,229 trades) gives 7.19% a year, monthly gives 7.11% and once a year 7.20%, barely different. Even with a trading cost of 0.2% of the amount traded, monthly rebalancing gives 7.09% and yearly 7.19%, a difference of less than 0.1 percentage points.

Taxes weigh far more than costs. In a taxable account in Japan, every sale of a stock at a profit is taxed at 20.315%, and most countries tax realized capital gains in a similar way. Rebalancing means “selling stocks that have risen”, so each sale sends part of the gain out as tax, and you keep investing with what is left. The tool does not calculate taxes, so the demon’s results in a taxable account would be worse than the figures in the tables. In an account where capital gains are tax-free, such as Japan’s NISA (a tax-exempt individual savings account, similar to the UK’s ISA), this problem goes away.

What the demon was really earning

So far the comparison has looked only at the final value. Taking the size of the price swings into account changes the picture. Over 100 years of US stocks, the demon’s annualized volatility was 8.61%, less than half that of buy and hold, and its maximum drawdown was −56% against −84%. The Sharpe ratio, which shows how much was earned relative to the size of the swings, was 0.46 for the demon and 0.40 for buy and hold, a slight edge to the demon.

The result can be read as: “Having cut the risk in half, it is only natural that the return fell, and it fell slightly less than the theory of a simple mix would suggest.” The demon’s extra 0.4% is less a source of profit than a bonus that appears when you mix stocks and cash.

Pairing stocks with bonds instead of cash makes the same picture even clearer. With the tool’s “Two-asset fixed-ratio rebalancing” at 50% US stocks and 50% US 10-year Treasuries, rebalanced monthly, the period from 1962 to September 2026 gives an annualized return of 8.55%, volatility of 8.61% and a maximum drawdown of −26.96%. Holding US stocks alone over the same period gives 10.59%, 16.19% and −54.57%. The drawdown is halved while the return drops by only 2 percentage points.

Back to the question at the start: if the demon made you rich, everyone would be doing it. In fact, everyone does. Balanced funds that hold stocks and bonds at fixed ratios and restore them periodically, and the way pension funds manage their asset allocation, are exactly this kind of rebalancing. But their goal is not to squeeze profit out of price swings; it is to avoid taking on more risk than they decided to. Seen as a “sure-fire way to win”, Shannon’s Demon is a disappointment. Seen as “a tool for keeping the amount of risk constant”, it is a sound method that many people already rely on.

The data used, and how to test the S&P 500 or the Nikkei 225

Every figure in this article can be reproduced with the data bundled in the investment strategy backtest. For US and Japanese stocks I used the daily market returns (dividends included) from the Data Library published by Professor Kenneth R. French of Dartmouth College. The US series starts in 1926 and is value-weighted across all stocks listed on the NYSE, AMEX and NASDAQ. The Japanese series is in US dollars, which I converted to yen with the exchange rate published by the Federal Reserve. For the interest on cash I used the Treasury bill rate from the same Data Library for US dollars, and for yen the 1-year rate from the Japanese Ministry of Finance’s JGB interest rate data (国債金利情報, in Japanese). My thanks go to Professor French, the Federal Reserve and the Ministry of Finance for preparing decades of daily data and keeping it freely available.

I did not use the S&P 500 or the Nikkei 225 because the companies that calculate those indexes own them, and redistributing their data requires permission. FRED, the database of the Federal Reserve Bank of St. Louis, also states that S&P 500 data may not be reproduced without permission, and that redistributing Nikkei 225 data to third parties requires permission from Nikkei Inc. Because the tool distributes data by placing it on the site, I chose redistributable total-market data. Large companies make up most of the US total market, so its long-run movement closely resembles the S&P 500 with dividends. The Japanese data also covers the whole market, so it is closer to TOPIX (the Tokyo Stock Price Index) than to the Nikkei 225.

If you want to test the S&P 500 or the Nikkei 225 itself, get daily closing prices as a CSV from a source you are entitled to use, then choose “Load a CSV” as the asset in the tool and load it. Besides the download features of index providers, brokers and financial data services, FRED lets you download the most recent 10 years of the S&P 500 and the Nikkei 225 from 1949 for research use. The loaded file is processed only inside your browser and is not sent anywhere. Note that indexes published for the general public are price indexes without dividends, so buy and hold will look worse by the amount of the dividends (about 2% a year for the S&P 500).

The results shown here are calculations based on past data. They do not indicate future investment results, and they do not recommend any particular way of investing. This goes beyond the demon: if you keep changing the number of days for moving averages or momentum in the tool, you will find plenty of settings that fit the past well. The settings found that way are often the ones that stop working in the future.