10-K Diver Profile picture
Oct 23, 2021 35 tweets 9 min read

Get a cup of coffee.

In this thread, I'll walk you through Shannon's Demon.

This is an investing "thought exercise" -- posed by the great scientist Claude Shannon.

Solving this exercise can teach us a lot about favorable vs unfavorable long-term bets, position sizing, etc.

Claude Shannon was an extraordinary engineer, scientist, and tinkerer.

For example, he single-handedly created the field of Information Theory -- the backbone behind virtually all modern communication and Internet technologies. Image

Shannon was not just a great scientist.

He was also a very successful investor.

He and his wife Betty were avidly interested (and active) in the stock market.

By some accounts, they managed to compound their portfolio at ~28% per year from the late 1950s through 1986. Image

Shannon eventually became a Professor at MIT.

While at MIT, he lectured a couple of times about stocks, investing, and trading strategies -- to packed audiences.

During these lectures, he posed (and solved) an exercise that is now known as "Shannon's Demon".


Imagine we have a stock that is extremely volatile.

Each day, the stock either *doubles* or *halves* in value.

There's a 50/50 chance of either outcome, and there's no way to predict it in advance.

Like a series of independent coin tosses -- one per day.

The question is:

Is there a way to consistently make money from this "double or halve each day" stock over the long term?

That is, can we turn the stock's *random walk* into a *compounding machine* that works in our favor?

This is the "Shannon's Demon" problem.

Let's take this 1 day at a time.

On Day 1, suppose we put $1 into our stock.

If we're *lucky*, the stock will double during Day 1. Our $1 will become $2.

But if we're *unlucky*, the stock will halve. And our $1 will be reduced to $0.50.

So, at the end of Day 1, we'll be left with either $2 or $0.50, depending on our luck.

On *average*, therefore, we'll be left with ($2 + $0.50)/2 = $1.25.

As we started the day with only $1, we have a 25% expected profit: $1 -> $1.25.

This type of bet, where on average we expect to make a profit -- is called a *positive expectation* bet.

This is good news. It means the odds are on our side.

If we play these odds *repeatedly*, we will make (rather than lose) money over time.

Here's one way to do that and come out on top:

Every day, we put in a fresh $1 into the stock.

Some days, we'll get lucky. Other days, we'll get unlucky.

Either way, we sell the stock at the end of each day.

Next day, we repeat the process with another $1.

And so on.

For example, suppose we do this for 10 straight days.

Our strategy calls for a fresh $1 each day. So, by the end of Day 10, we'll have put in $10.

And each day, the stock either doubles or halves. So, there are many possible "trajectories" (paths) that our money can take.

Here's a simulation of 50 such trajectories.

The RED ones lose money. That is, at the end of Day 10, we have less than the $10 we put in.

The GREEN ones either make money or leave us with exactly the $10 we put in.

As the simulation shows, we *could* lose money.

But as we play these odds longer and longer, our *likelihood* of losing money goes down.

That's "positive expectation" in action.

For example, here's a simulation over 100 days instead of 10.

See? No RED in sight.

But this strategy has problems.

First, it requires us to keep putting in fresh capital -- $1 every day.

Second, even if we get *incredibly* lucky and the stock doubles EVERY single day, that still only nets us $1 per day -- as we *risk* only $1 per day on the stock.

Making $1 per day may sound good.

But that's just LINEAR growth.

What we want is EXPONENTIAL growth. That's where the big money is.

Also, we want to put in $1 only ONCE. Not every day.

What if we try the following?

On Day 1, we take our $1. We put it into the stock.

We NEVER put in another dime.

And we just sit tight -- as our stock goes about doubling and halving.

Each individual day is *still* a +25% positive expectation bet.

If our stock is worth $X at the end of a particular day, the expectation is that it will be worth 1.25 * $X at the end of the next day.

So, over time, our money should compound at roughly 25% per day, right?

Sadly, NO.

It's true: we are still repeatedly playing the same favorable odds.

But NOT with the same amount of *capital* each time.

It's not "$1 per day". It's a different amount each day depending on the stock's history up to that point.

And that makes a BIG difference.

For example, here's a simulation of our "put in a dollar on Day 1 and sit tight" strategy.

As before, we follow 50 sample trajectories over 100 days.

See? Lots of RED.

(Note: the Y-axis is on a log scale.)

So, here's our problem.

Each of our *individual* bets carries a +25% positive expectation. These are *very* favorable odds -- a powerful advantage.

But this advantage seems to disappear the minute we try to *compound* these bets.

Here's what happens:

When we bet on our stock many times, "doublings" and "halvings" occur with roughly equal frequency -- 50/50.

When we *compound* these outcomes, each "doubling" exactly cancels out a "halving" -- leaving us with roughly the same $1 we started out with.

This is the crux of Shannon's Demon: there's a BIG difference between *arithmetic* (serial) and *geometric* (compounded) expectations.

The *arithmetic* expectation of a "50/50 doubling or halving" bet is +25%.

The *geometric* expectation of the SAME bet is ZERO.

To *compound* our money over time -- to grow it *exponentially* -- we need bets with positive *geometric* expectation.

And that's the genius of Shannon.

He figured out how to cajole a positive *geometric* expectation out of Shannon's Demon!

Shannon's solution is both simple and brilliant.

At the START of each day, Shannon bets exactly *half* his money on the stock. He keeps the other half in cash.

And at the END of each day, Shannon re-balances the portfolio back to this "magic ratio" -- 1:1 stock:cash.

So, each day, the "stock" part of Shannon's portfolio either doubles or halves.

If it doubles, Shannon *sells* a bit of stock -- to take the stock:cash ratio back to 1:1.

And if it halves, Shannon *buys* a bit of stock -- so he's back to 1:1 for the next day.

It turns out that this simple strategy has *positive* geometric expectation.

Over the long run, this strategy *compounds* money at roughly 6% per day.

Calculations: Image

Here's a simulation of Shannon's strategy.

Again, we have 50 sample trajectories over 100 days.

Mostly GREEN, very little RED.

With our original "put $1 into the stock and stick it out" strategy, there's a ~46% chance of seeing RED over 100 days.

Shannon's re-balancing cuts that down to just ~4.4%.

That's a dramatic improvement!

And as we make our time horizon even longer (beyond 100 days), the probability of losing money with the "stick it out" strategy RISES to 50%.

With Shannon's strategy, it FALLS -- to ZERO percent.

The Kelly Criterion is the core principle that Shannon used to devise his strategy.

For more on this:

If you want to learn more about Shannon's life, and his many contributions to information theory, circuit design, artificial intelligence, etc., I recommend reading @jimmyasoni's excellent book -- A Mind At Play: amazon.com/Mind-Play-Shan…

I also loved this ~1 hour episode of the @chatwithtraders podcast featuring Ed Thorp (@EdwardOThorp).

Here, Thorp beautifully explains The Kelly Criterion, and also narrates how he and Shannon built a wearable computer to beat casinos at Roulette! chatwithtraders.com/ep-109-edward-…

And here are some folks who write/tweet great stuff about geometric expectations and related topics:


Shannon's Demon is not a very realistic example.

After all, what stock exactly doubles or halves every day?

Still, learning the core principles behind Shannon's Demon can make us much better at probabilistic thinking, at taking advantage of mis-priced bets, etc.

If you're still with me, thank you very much!

Please stay safe, and enjoy your weekend.


• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with 10-K Diver

10-K Diver Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @10kdiver

Jun 28

Many people use the “Debt to Equity” ratio to tell whether a company has too much debt.

For example, if this ratio is less than 0.5, debt is “manageable”.

But if it’s over 1.5, there’s too much debt. So, the company is best avoided.


Here’s the problem with that.

Debt to Equity treats ALL debt the same way.

$1B that’s due 18 months from now is VERY different from the same $1B due 100 years from now.

But Debt to Equity treats them both the same.

Likewise, $1B borrowed at 10% interest vs $1B borrowed at 0.2% interest.

As far as Debt to Equity is concerned, they’re both the same.
Read 11 tweets
Jun 26

Get a cup of coffee.

In this thread, I'll walk you through a probabilistic thought experiment.

This will help you appreciate some key investing concepts:

- SURVIVAL is key,
- we need LONG TERM focus,
- the LUCK vs SKILL conundrum, and
- the CERTAINTY vs UPSIDE trade-off.

Imagine we have 101 stocks in front of us.

Of these, 1 is "Safe". The other 100 are "Risky".

We know which is which.

The Safe stock grows 10% every year. Like clockwork. There's NO uncertainty around it.

The Risky stocks are more uncertain.

But to compensate, they (seemingly) offer more UPSIDE.

Each Risky stock either *doubles* or *goes to zero* each year. There's a 50/50 chance of either outcome, and it's impossible to predict in advance which Risky stock will do what.
Read 25 tweets
Jun 12

Get a cup of coffee.

Many of us are grappling with high inflation. We are worried about how inflation is going to impact our portfolios, and our costs of living.

In this thread, I'll walk you through why inflation is so dangerous for businesses and investors.

Imagine we own a chain of coffee shops.

We sell $5M worth of coffee each year.

And each year, we pocket $1M of that $5M as profits.

So, we have:

Annual Revenues = $5M,
Costs = $4M, and therefore
Annual Profits = $1M.

IF inflation is *zero*, let's say we'll repeat this performance each year.

That is, each year, we'll get to take out $1M of *cash* from our coffee shops.

That's great: a steady, reliable source of income.
Read 21 tweets
May 27

This is hands down my favorite Charlie Munger quote.

As investors, we want to:

- Buy high quality businesses,
- At low prices, and
- Hold them for long periods of time.

Munger argues that *high quality* and *long periods of time* are far more important than *low prices*.

There’s so much to unpack here!

I hope this helps:

Here’s the *math* behind Munger’s quote — you knew this was coming!
Read 4 tweets
May 22

Protecting ourselves from inflation

Over the last few weeks, I've been asking myself:

IF high inflation is here to stay, what are some ways we can insulate ourselves from its impact?

Here are some thoughts:


For most of us, the path to financial independence consists of 3 steps:

- Earning consistently,
- Saving diligently, and
- Investing intelligently.

High inflation makes all 3 difficult to do.

Let's take them one by one.

First, "earning consistently".

Many of us depend on our jobs to derive the bulk of our income.

But inflation can put our jobs in danger.

This can make it hard to "earn consistently".
Read 25 tweets
May 19
Folks, I'm delighted to announce that Ali Ladha (@AliTheCFO) and I are launching a course together.

We're calling it BIBO: Business Investor, Business Operator.

Our goal: We want to help people make better financial decisions, by understanding business fundamentals really well.
Who This Course Is For

We think anyone who is fascinated by businesses will enjoy this course and learn something from it.

We're tailoring the course to 2 specific target audiences:

1) Small business owners/operators, and
2) New investors.
The Topics We'd Like To Cover

Here's what we came up with.

If you want us to include anything else, please let us know!
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!