10-K Diver Profile picture
Feb 27 27 tweets 9 min read
1/

Get a cup of coffee.

In this thread, I'll walk you through Recurrence Equations.

This is a beautiful area of math, with many finance/investing applications.

Plus, it can teach us a lot about problem solving in general -- how to simplify problems and solve them efficiently.
2/

The idea for this thread came from a puzzle I posed on Twitter a couple days ago.

It was a fairly simple counting exercise:

If we toss a coin 10 times, there are 2^10 = 1024 possible outcomes. How many of these WON'T contain 2 consecutive Tails?
3/

About 800 people responded to the poll.

But unfortunately, only ~23% of them picked the right answer.

The other ~77% got it wrong.
4/

So, most likely, many of us don't have good mental models for thinking about these kinds of questions.

If these questions are nails, many of us aren't equipped with the right kind of hammer to take to them.
5/

Enter Recurrence Equations -- a super-powerful math technique.

Once we know this technique, we'll be able to solve not just this question, but a whole host of others with all kinds of important applications to finance, investing, etc.

So, let's dive in!
6/

Imagine we toss a coin repeatedly. Say, N times.

Each time, we get a Heads (H) or a Tails (T).

But if we get 2 *consecutive* Tails -- ie, the pattern TT -- it's Game Over.

Our goal is to figure out how many ways we can *survive* N tosses *without* seeing this dreaded TT.
7/

Here's a "State Transition Diagram" to help us visualize this "avoid TT" game.

We start at state S1. We toss our coin to get a H or T.

If it's a H, we follow the H arrow, which keeps us in S1.

But if it's a T, we follow the T arrow, which takes us to S2.

And so on.
8/

Thus, at any given time, we are in one of 3 states: S1, S2, or S3.

We toss our coin, get our H or T, and based on this decide which arrow to follow *out of* our current state and *in to* our next state.

And at the next state, we rinse and repeat.
9/

We've constructed our diagram in such a way that, if we *ever* see a TT, we'll be in state S3 (the "Game Over" state) by the end of the TT.

And once we've seen TT and reached S3, there's no escape. We stay in S3 forever -- no matter whether future coin tosses are Hs or Ts.
10/

The idea is: we *never* want to get to S3.

That is, we want to count the number of ways we can toss our coin N times, and at the end of these N tosses, end up in either S1 or S2. Not S3.

All "TT less" outcomes will leave us in either S1 or S2.
11/

This suggests a logic for *counting* such "TT less" outcomes.

We "work backwards".

If we know where we want to be after N tosses, then we ask ourselves: where all can we be after "N minus 1" tosses? After "N minus 2" tosses? And so on.

Here's the reasoning:
12/

The end result of following the logic above is a Recurrence Equation.

This equation gives us a "recipe" for finding a_N -- the number of "TT less" outcomes after N tosses.

The recipe is: First find a_{N minus 1}. Then find a_{N minus 2}. Then add them up. That's a_{N}.
13/

For example, we want to find a_10 -- the number of "TT less" outcomes after 10 tosses.

By repeatedly using our Recurrence Equation recipe, we find that a_10 is 144.

Like so:
14/

Recurrence Equations are beautiful. They solve problems by *simplifying* them.

We break down a big problem into small, simple sub-problems.

We use the solutions to these sub-problems to *incrementally* build a solution to the big problem.

Brick by brick, we build a house.
15/

Recurrence Equations can be *automated* pretty easily as well.

Once we know that a_N = a_{N minus 1} + a_{N minus 2}, it's easy to create an Excel spreadsheet or a Python program to calculate a_10.

Or a_100.

Or a_1000.
16/

And if we learn a bit of math, we can also solve many Recurrence Equations *exactly*.

This can give us direct formulas for whatever we want to find. So, we won't even need a spreadsheet or computer program.

For example, here's an exact solution to our "TT less" problem:
17/

To find the exact solution above, I used the method of "Generating Functions".

Knowing this method can help us solve various Recurrence Equations that frequently arise in finance and investing.

For more:
18/

And the math can give us special insights.

For example, our "TT less" Recurrence Equation (a_N = a_{N minus 1} + a_{N minus 2}) happens to be the famous Fibonacci Recurrence.

Mathematicians have studied it for centuries and discovered all kinds of cool things about it!
19/

For instance, one well-known property of the Fibonacci Recurrence is that, as we take N to infinity, the ratio of successive a_Ns will quickly converge to the Golden Ratio, (1 + sqrt(5))/2.

That's approximately 1.618.

en.wikipedia.org/wiki/Golden_ra…
20/

So, as we toss our coin more and more times, the number of "TT less" outcomes grows at roughly 62% with each additional toss.

But the *total* number of possible outcomes *doubles* with each additional toss.

So, the *probability* of a "TT less" outcome will go to zero.
21/

Also, here's a surprising fact.

What if we want "HT less" outcomes instead of "TT less" outcomes?

It turns out that "HT less" outcomes are far rarer than "TT less" outcomes -- even though HT and TT have the exact same likelihood if our coin is fair!
22/

All kinds of financial models use Recurrence Equations.

For example, when companies grow by retaining and re-investing part of their earnings, this growth is usually modeled as a Recurrence Equation:

23/

Similarly, if we take out a mortgage to buy a house, our monthly payments are calculated using a Recurrence Equation:

24/

So, once we learn some general techniques to formulate and solve Recurrence Equations (like the techniques in this thread), many different kinds of financial calculations immediately become a breeze.
25/

Please join me tomorrow (Sun, Feb 26) at 1pm ET for a new episode of Money Concepts.

We'll talk about Recurrence Equations, how to model financial situations using them, how to solve them and glean insights from them, etc.

Link: callin.com/link/EcmhyBCbIb
26/

About Money Concepts

We're a virtual investing club. Our goal is to help each other become better investors.

We meet Sundays at 1pm ET via @getcallin, to discuss all things investing.

Join us. Get the app. Subscribe. Tell your friends.

It's FREE.

callin.com/show/money-con…
27/

Recurrence Equations may seem rather mathematical and esoteric.

But learning about them greatly improved my financial numeracy, and helped me understand all kinds of financial calculations better.

I hope this thread helped you as well.

Have a great 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

Feb 6
My friend @Gautam__Baid (and author of the excellent book, The Joys of Compounding) is launching a new Chapter.

It's called "Qualitative Investing And Fund Management".

Through this, Gautam wants to educate folks about important investing concepts.

A short thread: 👇👇👇
So, what's a "Chapter"?

It's a 4-week online course.

Once you enroll, you're given a curated set of resources that'll help you learn the basics of a subject over 4 weeks.

These resources are usually available for free online -- articles, blog posts, YouTube videos, etc.
Plus, you get access to an instructor (here, Gautam Baid). He shares his insights with you, you get to ask him questions, etc. -- through an online forum.

And you can also use this forum to interact with fellow course takers.
Read 9 tweets
Feb 5
1/

Get a cup of coffee.

In this thread, I'll show you how to read and understand a company's Balance Sheet.

As investors, we should be able to judge businesses by looking at their financial statements.

And the Balance Sheet, of course, is 1 of 3 key financial statements:
2/

Imagine that Alice and Bob are neighbors.

Alice owns and operates a "candles" business.

She makes candles in her loft, which she's converted into a lab of sorts.

She then takes the candles to a local home goods store, which sells them and pays her at the end of each month.
3/

Suppose it costs Alice $10 to make a candle. This is the cost of the candle's glass case, wax, wick, etc.

And suppose the home goods store pays Alice $15/candle, and sells 1460 of her candles every month.

Then, Alice would make ~$87.6K/year. Here's her Income Statement:
Read 28 tweets
Feb 5
1/

What can horse racing teach us about value investing?

This was the topic we discussed in our latest Money Concepts episode.

Here's the full ~1.5 hour recording. If that seems too long, scroll down for some key insights and short highlights!

Link: callin.com/link/iOmfhLZitI
2/

Steven Crist is highly skilled at betting onvv and profiting from horse races.

He's written a book chapter -- Crist On Value. It's 13 pages long.

Prof. Michael Mauboussin (@mjmauboussin), whom I greatly admire, has called this "the best 13 pages on value investing".
3/

You can get this book chapter (for free, as a PDF) here:

Link: hvst.com/posts/value-an…
Read 19 tweets
Jan 25
Folks, here's our latest Money Concepts episode.

It's about the "magic of retained earnings" -- how businesses can create tremendous value by retaining part of their earnings and compounding it over time.

Scroll down for some ~2 minute highlights!

callin.com/link/KuNDjEYcDF
Highlight #1

The "Intrinsic Value" of a stock is the discounted present value of ALL future dividends from that stock.

And businesses that retain part of their earnings and compound it at a decent rate can deliver *exponential* growth in this intrinsic value over time.
Highlight #2

All companies eventually die.

IF a company NEVER pays a dividend from the time it is founded until its eventual death, then the Intrinsic Value of that company's shares is ZERO.

Even if the company produces growing earnings and cash flows for a period of time.
Read 7 tweets
Jan 22
1/

Get a cup of coffee.

In this thread, I'll walk you through the "magic of retained earnings".

This is the basic theory behind why stocks grow exponentially over long periods of time.

As investors, we'd do well to understand this theory -- and the assumptions it's based on.
2/

Warren Buffett's 2019 letter to Berkshire shareholders has a section titled "The Power of Retained Earnings".

In this section, Buffett describes how businesses can deliver enormous benefits to their owners by *retaining* and *compounding* a portion of their earnings:
3/

Let's break down this key insight from Buffett's letter.

Imagine we have a business that earns $100M per year.

Let's say this $100M neither grows nor shrinks over time.
Read 32 tweets
Jan 22
Folks, here's our latest Money Concepts episode.

We met on Sunday. We discussed several concepts related to compounding and exponential growth -- for ~1.5 hours.

If that seems too long, scroll down for some ~2 minute highlights!

callin.com/link/MHIxpuMaIc
Highlight #1

Compounding means *exponential* growth of wealth.

Examples of compounding: (1) A savings account that accrues interest, (2) a business that retains earnings and re-invests them to earn steady returns.

NOT an example of compounding: hourly wages.
Highlight #2

Buffett's early start is a big part of his > $100B net worth. He bought his first stock when he was just 11.

Thankfully, most of us don't need $100B to be happy in life. If our goal is simply to achieve Financial Independence, we can afford to start a little later.
Read 10 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 on Twitter!

:(