ergodicity

Tejas
11 min readJun 21, 2022

--

A big little idea on ergodicity, ruin and rationality.

tl; dr

Your chart lines/patterns don’t work.

queue angry 19-year-old TikTok TA forex trader angry noises.

On a serious note, ergodicity teaches us the importance of how staying alive is infinitely more valuable than any amount of PnL.

Fans of iconoclast Nassim Taleb will know about it, but mathematicians more so. Everyone seems to be in disagreement when it comes to the definition of ergodicity. But for the sake of this article, I’ll assume that of Taleb’s.

Taleb’s work on ergodicity is beautiful. Taleb talks about how CBA (cost-benefit analysis) and expected values on processes, with a possibility of ruin, are useless. Ergodicity is the study of rationality, returns, and optimality scale across both levels(from individuals to populations) and time(short-term to long-term).

definition

There are several related and overlapping technical/mathematical definitions of ergodic, but here are the ones I felt were helpful.

ELI5: In the most basic terms, ergodicity is when the average outcome of a group is the same as the average outcome of an individual over time.

Ergodicity matters because of “phantom consequences” that are invisible when observing a single state but become visible when scaling that state through time (repeated serial exposure) and observation continuum (observations of multiple states).

Take, for example, Russian roulette. The “phantom consequence” or an “absorption barrier”, as Taleb puts it, is a loss(death in this scenario) that absorbs all past AND future gains. A traditional cost-benefit analysis would tell us that the expected value for a group of 6 people playing the game would be 830,000$, with an 83.33% chance. If you played Russian roulette more than once, your expected value is not 830,000$; it’s a one-way ticket to the grave (take your shitty cost-benefit analysis with you). A term better suited to this scenario would be an ergodic average, which is $0 in this case.

To further expand on the earlier scenario, probabilities across multiple individuals are irrelevant/misleading to probabilities across time. The outcome of one person fishing every day at a pond is sustenance, whereas that of the entire village would be an empty pond. The “phantom consequence” in this scenario would be the fact that when you kill a fish, you are also ending the life of its unborn descendants, which only became apparent after the absorption barrier was hit(the last two fish that were killed).

As mentioned earlier, these phantom consequences only became visible when scaling through time(repeated serial exposure) and levels(more people/states to observe). Ergodicity plays a crucial role in understanding how rationality and optimality are extremely different when defined for an individual or a group, for a single or repeated exposure.

an alternative definition, path dependence

This is the definition physicists usually refer to. An ergodic system returns to every possible state an infinite number of times. There are no absorption barriers, phantom consequences, or ruin, simply put. There are no runaway scenarios in which values switch to an entirely new state and never revert to the old state.

Assuming ergodicity, one can say that in 4.5 billion years of life on earth, with uncountable numbers of geological and biological subsystems, none of which have destroyed the world, it is unlikely that for the few hundred thousand years Sapiens has been on earth can lead to global catastrophe. Obviously a lot of other assumptions and nuances, but it’s something to think about.

a mathematical definition

I’m not a mathematician, and I’m way over my skis here, so I’ll lead you to the original paper, which has been really fun to read.

The term "ergodicity" refers to the equivalence of the expected value and the temporal average of observables. Ergodic theories of decision-making, when applied to human behaviour, indicate how individuals should tolerate risk in various settings. Agents should modify their utility function to the dynamical situation they are in to optimize wealth over time. For additive dynamics, linear utility is best, but for multiplicative dynamics, logarithmic utility is best. It's unclear whether humans can approximate time-optimal behaviour across diverse dynamics. The impacts of additive versus multiplicative gamble dynamics on risky choices are compared in this paper. We show that gamble dynamics alter utility functions in ways that are not explained by current choice theory. Instead, risk aversion grows under multiplicative dynamics, as anticipated by time optimality, and distributions close to the values expected by time optimality.

ugh.. the math-ey stuff

Enter the stochastic process.

The time average and the ensemble average are conceptually different operations. The time average is informative of a single system over a period, while an ensemble average is informative of an aggregate of systems. Which to use? Well, that depends on the research question asked and who asked it.

Area between chart & x-axis / n.

A process is ergodic if the ensemble average and time average are equal (when both N and T tend to infinity).

examples of ergodic processes

An example of an ergodic process would be coin flips(trivial sampling). The probable outcomes from flipping a coin are ergodic. Whether a hundred people flip the coin once or one person flips the coin a hundred times, the odds are always even. (Now, if agents bet on the outcome of the flip, it may no longer be ergodic). Try out Peter’s coin game here!

Another example of a less subtle ergodic process would be an auto-regressive process. This process has weak/no path dependence and forgets its initial condition over a long enough time period, hence ergodic. A real-world example could be the GDP, where most people feel disenfranchised, and feel like they are not participating, which is indeed the case; the typical individual most likely isn’t participating in economic growth.

examples of non-ergodic processes

Pólya urn.

This is an interesting one. The urn has a green and a red ball. A ball is drawn randomly from the urn, and another ball of the same colour is added back to the urn. You can try out this experiment here as well!

over infinite draws, what will be the fraction of green balls over total balls?
Plotting out the fraction for a single colour ball over parallel simulations

What the heck is happening here? Although the ensemble average over infinite systems ≈ 0.5, in each of these the time average of the simulation converges to the realization of a random variable. Each of the simulations has strong path dependence/reinforcement. What I mean by this is that the initial draw is very influential on the eventual ball fraction, which is reinforced the more balls the urn is filled with.

Random Multiplicative Growth

Peter’s coin game — 50% if it lands on heads, 40% otherwise
the red line is the ensemble average, while the rest are single simulations (time averages)

It’s hard to picture the ensemble average on a time scale since there are infinite trajectories, of which some are growing exponentially but just picture one there. The exponentially decaying trajectories will never go below 0 — just between 0 and initial wealth. So even if you have a very small amount of trajectories growing exponentially, they will dominate the ensemble average (outweigh the likely losses), which isn’t shown.

Looking at this chart, ask yourself, is this relevant to me? Can you access this average? Almost all of the trajectories are headed for ruin, and there’s no turning back once an absorption barrier is hit. Nor can you tap into parallel simulations to get a better average or force other agents to share their winnings. As a collective (ensemble average), everyone seems to be winning, but individually, almost everyone is losing. How’s this possible?

The problem is that ensemble perspectives over-emphasize exceptional success and are only relevant to the collective, whereas the time perspective reflects the experience of a single agent and should be the only average relevant unless ergodicity is present. Think of it this way, if Bill Gates were to walk onto a bus, he instantly makes everyone a billionaire on average. Does this give any meaningful information about the net worth of the regular individual? Not really.

why should I care

Although ergodicity is a well-researched and foundational concept in statistical physics and some others, ergodicity is heavily underappreciated in other fields, such as economics and finance. Economists basically willingly ignore/deny the existence of ergodicity and are very detached from any grounding in reality. Common literature on behavioural finance and trading gurus all make this mistake. People tend to think as though most systems are ergodic, but pretty much any system touched by humans is non-ergodic, and treating them as ergodic, exposes one to the risk of financial ruin/death.

Using expectation values loosely(assuming ergodicity) as a reflection of temporal phenomena, one can get caught offside very easily, and no single person can capture the returns of the market on a long enough time span unless they have Alameda’s pockets. This is why you should stay far away from finance “professors”, gurus or local banks making investment recommendations based on the long-term returns of the market.

Ergodicity is less frequent than you would think and doesn't take much (human intervention) to scare it away.

This explanation by Ole Peters sums it up very well.

Stories unfold over time, respecting dynamic logic: Bob cannot light the fire before he’s collected the wood. Ergodic models replace time with a measure: bits of Bob forever light the fire, collect the wood, are young and old. Handy if stories don’t matter; misleading if they do.

butt… eXpEcTed VaLuE?

In the context of non-ergodic systems (e.g. financial markets), the concept of “expected returns”, or “EV”, as crypto Twitter calls it, is meaningless. Changes in wealth for an agent in the financial market are multiplicative, not additive. I will use trader speak now, so it shall make sense.

Suppose we have a trader who takes 1.5R trades. 1:1.5 risk-reward ratio, so for every unit portfolio risked, he stands to gain 1.5 units more than he loses relative to his portfolio prior to the trade. Let’s be optimistic and assume this trader has 50% odds on this bet. Changes in wealth now are non-ergodic (path-dependent), so calculating the expectation value is not informative of the time average growth rate of wealth. This exact gamble has a positive expected value, but it has a negative time-average growth rate. Let me explain.

🚀🚀🚀 CRYPTO PUMP & DUMP SIGNALS 🚀🚀🚀
ENTRY: 1.00
TP: 1.60
SL: 0.60
🔥 FOLLOW FOR MORE AMAZING SIGNALS !! JOIN OUR AMAZING COMMUNITY

So 60% if we win, 40% loss otherwise. 1.5:1R

If 10 traders each took this trade with 100$, their average expected return (a.k.a ensemble average) would be better than ever. 5 will win, 800$ (5 people * 160$), the remaining 5 will lose (5 * 60$ = 300$). So the group as a whole has made 800$ + 300$ = 1100$, putting each trader “up on average” to 110$ (10%). No single trader will ever be able to capture this return alone. If a trader were to engage in this trade 10 times sequentially, investing his winnings each time, his earnings are likely worse than average. This is because, through time, we have to multiply probabilities because singular agents are only concerned with time probabilities, not an ensemble. This is how scummy paid group leaders and “trade signals” providers lie to rope in the naive with their fraudulent “stats”.

With just a two-trade losing streak, the “trader” now has started with less money than he began with. His time average is 1.6 * 0.6 = 0.96, whereas the ensemble average was 0.5 * 1.6 + 0.5 * 0.6 = 1.10. The average for the trader placing 10 1.5R trades is worse than 10 different traders placing 1.5R trades. The group as a whole seems like making money over time, but everyone in it is losing money over time. In fact, the group as a whole won’t make money each round.

Why? Because the ensemble average means nothing for any single player. No one scores a constant 110% return. Players score either 160% or 60% and then invest their winnings in the next round. Their expected payoff through time is, therefore, not the snapshot average of the winning payoff and the losing payoff — that is a return the player certainly won’t get — but the product of the winning payoff multiplied by the losing payoff (i.e. 96%).

This is the amount over time each player should expect to win. Or, in this case, lose: This is the casino's modus operandi: the more you play, the more, inevitably, the “trader’s” investment will tend to zero.

This can change, however, if they cooperate. If all players combine their returns and share them after each round, everyone will have 110% to invest in each round. Then they will track the ensemble average.

No, put away the Communist Manifesto. No profitable casino on the planet would offer this bet if they knew the ensemble average > 1, else they would blow up harder than 3AC did.

now what?

  1. Kelly’s Criterion. Kelly tries to bring as much ergodicity as possible into non-ergodic realms. It optimizes not for expected value as most risk management measures do but for typical wealth. But note that even Kelly is not safe from financial ruin; you can go bust even on a favorable bet.
  2. The Barbell approach. It’s an approach that advocates playing it safe in some areas and taking a lot of small risks in others. So basically, risk aversion on one side and extreme risk-loving in certain areas. For example, the barbell approach applied to one’s career would be getting good at a traditional/safe profession like accounting while moonlighting in a separate, comparably riskier profession like acting. This combined approach makes your career “more ergodic” than either one alone.

Remember, multiplicative, not additive. Check out the interactive webapp I made for this article.

Stealing this from Cobie, please remember that I’m an actual idiot. I have zero actual financial markets experience, I’m not a financial advisor, and I don’t understand how money works. I was born naked and crying in the cold, sterile hospital light, and not much has changed since then. These are just my opinions (& what I’ve read online), they might be bad opinions, and I might change them tomorrow. Thanks for reading.

References

- Why ergodicity is interesting in the context of modeling human social behavior (Ole Peters)
- The Logic of Risk Taking (Nicholas Nassim Taleb)
- Ergodicity (Jolly Contrarian)
- Ergodicity-breaking reveals time optimal decision making in humans (University of Copenhagen)
- Ergodicity simply explained (Ryan Faulkner-Hogg)
- What is ergodicity? (Alex Adamou)
- How you will go bust on a favorable bet-Kelly/Shannon/Thorp (Nicholas Nassim Taleb)
- Time for a Change: Introducing irreversible time in economics - Dr Ole Peters

--

--

Tejas
Tejas

Written by Tejas

mindless meanderings on quant finance, machine learning and philosophy

No responses yet