10-K Diver Profile picture
Oct 23, 2021 35 tweets 9 min read Read on X
1/

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.
2/

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
3/

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
4/

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".

👇👇👇
5/

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.
6/

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.
7/

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.
8/

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.
9/

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.
10/

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.
11/

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.
12/

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.
13/

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.
14/

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.
15/

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.
16/

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.
17/

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?
18/

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.
19/

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.)
20/

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.
21/

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.
22/

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.
23/

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!
24/

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.
25/

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.
26/

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
27/

Here's a simulation of Shannon's strategy.

Again, we have 50 sample trajectories over 100 days.

Mostly GREEN, very little RED.
28/

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!
29/

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.
30/

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

For more on this:
31/

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…
32/

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-…
33/

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

@TaylorPearsonMe
@JasonMutiny
@breakingthemark
@KrisAbdelmessih
34/

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.
35/

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

Please stay safe, and enjoy your weekend.

/End

• • •

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!

PDF

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

Jan 1, 2023
1/

Get a cup of coffee.

In this thread, I'll walk you through "Gambler's Ruin".

This is a classic exercise in probability theory.

But going beyond the math, this exercise can teach us a lot about life, business, and investing.
2/

In my mind, Gambler's Ruin is the math of "David vs Goliath" ("Skill vs Size") type situations.

Here, David is a "small" player. He only has limited resources. But he's very skilled.

Pitted against David is Goliath -- a "big" player who has MORE resources but LESS skill.
3/

The battle between David and Goliath rages on for several "rounds".

Each round has a "winner" -- either David or Goliath.

David -- because of his superior skill -- has a higher probability of winning any individual round. That's David's advantage over Goliath.
Read 32 tweets
Dec 11, 2022
1/

Get a cup of coffee.

In this thread, we'll explore the question:

As investors, how often should we check stock prices?

To answer this, we'll draw on key ideas and concepts from many different fields -- probability, information theory, psychology, etc.
2/

Imagine we have a stock: ABC, Inc.

Every day that the market is open, our stock either:

- Goes UP 1%, or
- Goes DOWN 1%.

For simplicity, let's say these are the only 2 possible outcomes on any given trading day.
3/

Suppose we think ABC is a "good" investment.

That is, the company has a wide moat, good returns on capital, decent growth prospects, etc. And the stock trades at a reasonable price.

So, we buy the stock -- expecting to make a very good return on it. Say, ~15% per year.
Read 40 tweets
Oct 23, 2022
1/

Get a cup of coffee.

In this thread, I'll walk you through 2 key portfolio diversification principles:

(i) Minimizing correlations, and
(ii) Re-balancing intelligently.

You don't need Markowitz's portfolio theory or the Kelly Criterion to understand these concepts. Image
2/

Imagine we have a stock: ABC Inc. Ticker: $ABC.

The good thing about ABC is: in 4 out of 5 years (ie, with probability 80%), the stock goes UP 30%.

But the *rest* of the time -- ie, with probability 20%, or in 1 out of 5 years -- the stock goes DOWN 50%.
3/

We have no way to predict in advance which years will be good and which will be bad.

So, let's say we just buy and hold ABC stock for a long time -- like 25 years.

The question is: what return are we most likely to get from ABC over these 25 years?
Read 23 tweets
Sep 11, 2022
1/

Get a cup of coffee.

In this thread, I'll walk you through the P/E Ratio.

Why do some companies trade at 5x earnings and others trade at 50x earnings?

When I first started investing, this was hard for me to understand.

So, let me break it down for you.
2/

Imagine we have 2 companies, A and B.

Let's say both companies will earn $1 per share next year.

And both companies will also GROW their earnings at the SAME rate: 10% per year. Every year. Forever.
3/

Suppose A trades at a (forward) P/E Ratio of 10. So, each share of A costs $10.

And B trades at a P/E Ratio of 15. So, each share of B costs $15.

Which is the better long term investment: A or B?
Read 31 tweets
Sep 4, 2022
1/

Get a cup of coffee.

In this thread, I'll walk you through a fundamental business concept that may be counter-intuitive to some of you:

Just because a business has made $1 of PROFIT, it does NOT mean the business's owners have $1 of CASH to pocket.
2/

To understand why, let's start with how PROFIT is defined.

PROFIT = SALES - COSTS

That is, we take all sales (or revenues) the company made during a quarter or year.

We back out all costs incurred during this period.

That leaves us with profits.

Seems straightforward.
3/

Here's the problem:

The way a "lay person" understands words like SALES and COSTS is completely different from the way an *accountant* uses these same words.

These discrepancies can create enormous confusion.
Read 20 tweets
Aug 28, 2022
1/

Get a cup of coffee.

In this thread, I'll walk you through a framework that I call "Lindy vs Turkey".

This is a super-useful set of ideas for investors.

Time and again, these ideas have helped me think more clearly about the LONGEVITY of the companies in my portfolio.
2/

Imagine we're buying shares in a company -- ABC Inc.

ABC is a very simple company. It earns $1 per share every year. These earnings don't grow over time.

And ABC returns all its earnings back to its owners -- by issuing a $1/share dividend at the end of each year.
3/

Suppose we buy ABC shares for $5 a share.

That's a P/E ratio of 5.

We know we get back $1/year as a dividend.

So, for us to NOT lose money, ABC should survive AT LEAST 5 more years.

If something happens and ABC DIES before then, we'll likely lose money.
Read 32 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!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(