Information Theory and Portfolio Theory

The stock market as a generalized horse race; price relatives, portfolios and wealth relatives; why mean–variance theory is the wrong objective for reinvested wealth; growth rate and log-optimal portfolios; concavity, convexity and the Kuhn–Tucker characterization; one-day optimality E[S/S*] ≤ 1 and expected proportions that stay constant; asymptotic optimality against every causal strategy via Markov and Borel–Cantelli; the cost of a wrong distribution D(f‖g) and the value of side information ≤ I(X;Y); stationary markets, the chain rule for W*, the supermartingale S_n/S_n* and the AEP for the stock market; competitive optimality with fair randomization; finite-horizon minimax universal portfolios and the Shtarkov factor V_n ~ n^{-(m-1)/2}; horizon-free Dirichlet(1/2) universal portfolios; and the sandwich proof of the Shannon–McMillan–Breiman theorem

· 29 min read · 5,779 words

Motivation: from the racetrack to the exchange

The horse race is an extreme market: every asset but one pays zero, and exactly one pays its odds. A real stock exchange, whose prices arrived at telegraph offices by ticker tape, is gentler. Every stock returns something each day, usually close to what it was worth the day before. This note carries the whole horse-race theory across:

Horse raceStock market
Kelly bet b=pb = pLog-optimal portfolio b∗b^* (no closed form; Kuhn–Tucker conditions)
W∗=∑pilog⁡oi−H(p)W^* = \sum p_i\log o_i - H(p)W∗=max⁡bElog⁡btXW^* = \max_b\mathbb E\log b^tX
Side information is worth I(X;Y)I(X;Y) exactlySide information is worth at most I(X;Y)I(X;Y)
Conservation: W∗+H=log⁡mW^* + H = \log mChain rule for W∗W^*, the dual of the chain rule for HH
Shannon code is competitively optimalLog-optimal portfolio is competitively optimal
Universal codes (Laplace, KT)Universal portfolios (Cover)

IntuitionThe central claim

Growth of reinvested wealth is to the stock market what entropy is to a source. The best strategy is the one that maximizes expected log wealth, and every result about it mirrors a result about codes: optimality in expectation, competitive optimality, asymptotic optimality, a chain rule, and universal schemes that need no model.


The stock market: definitions

DefinitionStock vector, portfolio, wealth relative

  • Stock vector: X=(X1,…,Xm)\mathbf X = (X_1, \ldots, X_m), with Xi≥0X_i \ge 0 the price relative of stock ii: end-of-day price divided by start-of-day price. For example, Xi=1.03X_i = 1.03 means up 3% today. X∼F(x)\mathbf X \sim F(\mathbf x), a joint distribution.
  • Portfolio: b=(b1,…,bm)\mathbf b = (b_1, \ldots, b_m), bi≥0b_i \ge 0, ∑bi=1\sum b_i = 1, the fraction of wealth in each stock. The set of portfolios is the simplex B\mathcal B.
  • Wealth relative: S=btX=∑ibiXiS = \mathbf b^t\mathbf X = \sum_ib_iX_i, the factor by which wealth changes today.
ComponentDetail
SignatureS:B×R+m→[0,∞)S : \mathcal B \times \mathbb R_+^m \rightarrow [0,\infty)
InputsA portfolio and today’s price relatives.
OutputToday’s wealth multiplier.
Horse-race special caseX=okek\mathbf X = o_k\mathbf e_k when horse kk wins, so S=bkokS = b_ko_k.

Why mean–variance is the wrong objective

RemarkSharpe–Markowitz theory

Standard practice optimizes the first two moments of SS: maximize ES\mathbb E S subject to a cap on Var S\mathrm{Var}\,S. The undominated portfolios trace the efficient frontier in the (variance, mean) plane. Adding a risk-free asset (cash or Treasuries: fixed return, zero variance) makes the tangent line from that asset to the frontier the new frontier. The capital asset pricing model derives a “fair” price for each stock’s risk from this.

WarningMeans govern sums; reinvested wealth is a product

The mean describes the long-run behaviour of a sum of i.i.d. terms. But an investor who reinvests daily ends with Sn=∏i=1nbtXiS_n = \prod_{i=1}^n\mathbf b^t\mathbf X_i, a product. A product is governed by the expected logarithm, exactly as in the horse race, where maximizing expected wealth led to almost-sure ruin.

DefinitionGrowth rate and log-optimal portfolio

W(b,F)=∫log⁡btx dF(x)=Elog⁡btXW(\mathbf b, F) = \int\log\mathbf b^t\mathbf x\,dF(\mathbf x) = \mathbb E\log\mathbf b^t\mathbf X

This is the doubling rate if the log is base 2. The optimal growth rate is W∗(F)=max⁡b∈BW(b,F)W^*(F) = \max_{\mathbf b\in\mathcal B}W(\mathbf b,F), and any maximizer b∗\mathbf b^* is a log-optimal (growth-optimal) portfolio.

ComponentDetail
SignatureW:B×{distributions on R+m}→[−∞,∞)W : \mathcal B \times \{\text{distributions on } \mathbb R_+^m\} \rightarrow [-\infty, \infty)
DomainA portfolio and a market distribution.
CodomainExpected log-growth per day.

TheoremWealth grows at the optimal rate

If X1,X2,…\mathbf X_1, \mathbf X_2, \ldots are i.i.d. ∼F\sim F and Sn∗=∏i=1nb∗tXiS_n^* = \prod_{i=1}^n\mathbf b^{*t}\mathbf X_i (a constant rebalanced portfolio: rebalance to b∗\mathbf b^* every morning), then

1nlog⁡Sn∗⟶W∗with probability 1,Sn∗≐2nW∗\frac1n\log S_n^* \longrightarrow W^* \quad\text{with probability 1}, \qquad S_n^* \doteq 2^{nW^*}

ProofStrong law on the log returns

1nlog⁡Sn∗=1n∑ilog⁡b∗tXi\frac1n\log S_n^* = \frac1n\sum_i\log\mathbf b^{*t}\mathbf X_i, a sample mean of i.i.d. terms, which converges to Elog⁡b∗tX=W∗\mathbb E\log\mathbf b^{*t}\mathbf X = W^* almost surely. The horse-race version used only the weak law.

∎

Warning“Constant rebalanced” is not “buy and hold”

A constant rebalanced portfolio trades every day to restore the fixed fractions b\mathbf b: it sells what went up and buys what went down. That is what makes the daily factors i.i.d., and it is the source of the gains in the HP–Altria example below.

Shape of the growth rate

LemmaConcavity and convexity

  • W(b,F)W(\mathbf b, F) is concave in b\mathbf b and linear in FF.
  • W∗(F)W^*(F) is convex in FF.
ProofLog is concave; integrals are linear; a max of linear functions is convex

Linear in FF: WW is an integral against dFdF.

Concave in b\mathbf b: log⁡(λb1+(1−λ)b2)tX≥λlog⁡b1tX+(1−λ)log⁡b2tX\log(\lambda\mathbf b_1 + (1-\lambda)\mathbf b_2)^t\mathbf X \ge \lambda\log\mathbf b_1^t\mathbf X + (1-\lambda)\log\mathbf b_2^t\mathbf X pointwise. Take expectations.

Convex in FF: let bλ∗\mathbf b_\lambda^* be log-optimal for λF1+(1−λ)F2\lambda F_1 + (1-\lambda)F_2. By linearity in FF,

W∗(λF1+(1−λ)F2)=λW(bλ∗,F1)+(1−λ)W(bλ∗,F2)≤λW∗(F1)+(1−λ)W∗(F2)W^*(\lambda F_1 + (1-\lambda)F_2) = \lambda W(\mathbf b_\lambda^*, F_1) + (1-\lambda)W(\mathbf b_\lambda^*, F_2) \le \lambda W^*(F_1) + (1-\lambda)W^*(F_2)

since no single portfolio beats each market’s own optimum.

∎

IntuitionWhy convex in FF is natural

An investor who knows which of two markets they’re in can tailor the portfolio to it, and does better on average than one who faces the mixture blind. Mixing markets destroys exploitable structure, just as mixing sources raises entropy (concavity of entropy).

LemmaThe log-optimal portfolios form a convex set

If b1,b2\mathbf b_1, \mathbf b_2 are both log-optimal, concavity gives W(λb1+(1−λ)b2)≥λW∗+(1−λ)W∗=W∗W(\lambda\mathbf b_1 + (1-\lambda)\mathbf b_2) \ge \lambda W^* + (1-\lambda)W^* = W^*, so the mixture is log-optimal too.


Kuhn–Tucker characterization of the log-optimal portfolio

The problem. The horse race had the closed form b∗=p\mathbf b^* = p. A general market doesn’t. We are maximizing a concave function over the simplex, so the optimum may sit on the boundary (some stocks held at zero). We need a test for optimality.

TheoremKuhn–Tucker conditions

b∗\mathbf b^* is log-optimal for X∼F\mathbf X \sim F iff

E[Xib∗tX]{=1if bi∗>0,≤1if bi∗=0.\mathbb E\left[\frac{X_i}{\mathbf b^{*t}\mathbf X}\right] \begin{cases} = 1 & \text{if } b_i^* > 0,\\ \le 1 & \text{if } b_i^* = 0.\end{cases}

IntuitionA held stock earns exactly the portfolio’s own return

Xib∗tX\frac{X_i}{\mathbf b^{*t}\mathbf X} is how stock ii did relative to the whole portfolio today. At the optimum, every stock you hold breaks even on average against your portfolio; otherwise you’d shift money toward the one that beats it. A stock you don’t hold is one that would lose on average, so holding none is right.

ProofDirectional derivatives along the simplex

Step 1: Concavity reduces optimality to a first-order test. WW is concave on the simplex, so b∗\mathbf b^* is optimal iff, for every b∈B\mathbf b\in\mathcal B, the one-sided derivative along bλ=(1−λ)b∗+λb\mathbf b_\lambda = (1-\lambda)\mathbf b^* + \lambda\mathbf b at λ=0+\lambda = 0^+ is ≤0\le 0.

Step 2: Compute the derivative.

ddλEln⁡bλtX∣0+=lim⁡λ↓01λEln⁡(1+λ(btXb∗tX−1))=EbtXb∗tX−1\frac{d}{d\lambda}\mathbb E\ln\mathbf b_\lambda^t\mathbf X\Big|_{0^+} = \lim_{\lambda\downarrow0}\frac1\lambda\mathbb E\ln\left(1 + \lambda\Big(\frac{\mathbf b^t\mathbf X}{\mathbf b^{*t}\mathbf X} - 1\Big)\right) = \mathbb E\frac{\mathbf b^t\mathbf X}{\mathbf b^{*t}\mathbf X} - 1

Dominated convergence justifies swapping the limit and the expectation. So the test is EbtXb∗tX≤1\mathbb E\frac{\mathbf b^t\mathbf X}{\mathbf b^{*t}\mathbf X}\le1 for all b\mathbf b.

Step 3: Vertices suffice. The expression is linear in b\mathbf b, so checking the vertices ej\mathbf e_j is enough: EXjb∗tX≤1\mathbb E\frac{X_j}{\mathbf b^{*t}\mathbf X}\le1 for every jj.

Step 4: Equality for held stocks. If bj∗>0b_j^* > 0, the segment from ej\mathbf e_j through b∗\mathbf b^* extends beyond b∗\mathbf b^* inside the simplex. Then the two-sided derivative exists and must vanish, which forces equality. If bj∗=0b_j^* = 0, the segment can’t extend, and only the inequality is required.

∎

TheoremOne-day optimality

With S∗=b∗tXS^* = \mathbf b^{*t}\mathbf X and S=btXS = \mathbf b^t\mathbf X for any other portfolio:

Eln⁡SS∗≤0  for all S  ⟺  ESS∗≤1  for all S\mathbb E\ln\frac{S}{S^*}\le0 \ \text{ for all } S \iff \mathbb E\frac S{S^*}\le1 \ \text{ for all } S

ProofAverage the Kuhn–Tucker inequalities; Jensen for the converse

(⇒) Multiply EXib∗tX≤1\mathbb E\frac{X_i}{\mathbf b^{*t}\mathbf X}\le1 by bib_i and sum over ii: EbtXb∗tX≤∑bi=1\mathbb E\frac{\mathbf b^t\mathbf X}{\mathbf b^{*t}\mathbf X}\le\sum b_i = 1.

(⇐) By Jensen, Elog⁡SS∗≤log⁡ESS∗≤log⁡1=0\mathbb E\log\frac S{S^*}\le\log\mathbb E\frac S{S^*}\le\log1 = 0.

∎

ImportantThe log-optimal portfolio wins on ratios, not just logs

Maximizing Elog⁡\mathbb E\log was motivated by long-run growth. But it also gives E[S/S∗]≤1\mathbb E[S/S^*]\le1 for every competitor SS, every single day. No portfolio expects to beat it by any factor on average. This short-term property drives every competitive result below.

CorollaryExpected holdings don’t drift

Start the day with fractions b∗\mathbf b^*. At the end of the day, the fraction of wealth in stock ii is bi∗Xib∗tX\frac{b_i^*X_i}{\mathbf b^{*t}\mathbf X}, and by Kuhn–Tucker its expectation is bi∗EXib∗tX=bi∗b_i^*\mathbb E\frac{X_i}{\mathbf b^{*t}\mathbf X} = b_i^*. In expectation, the market leaves the log-optimal allocation where it was. This is the counterpart of Kelly betting, where the proportions are unchanged in expectation after each race.


Asymptotic optimality of the log-optimal portfolio

DefinitionCausal (nonanticipating) strategy

A sequence of maps bi:R+m(i−1)→B\mathbf b_i : \mathbb R_+^{m(i-1)}\rightarrow\mathcal B: the portfolio for day ii may depend on x1,…,xi−1\mathbf x_1, \ldots, \mathbf x_{i-1} but not on the future.

LemmaConstant rebalancing maximizes expected log wealth (i.i.d. market)

For any causal strategy with wealth SnS_n, Elog⁡Sn∗=nW∗≥Elog⁡Sn\mathbb E\log S_n^* = nW^*\ge\mathbb E\log S_n.

ProofThe problem splits day by day

Elog⁡Sn=∑iElog⁡bit(Xi−1)Xi\mathbb E\log S_n = \sum_i\mathbb E\log\mathbf b_i^t(\mathbf X^{i-1})\mathbf X_i. Each term is maximized separately. Since Xi\mathbf X_i is independent of the past, the best day-ii choice ignores the past and equals b∗\mathbf b^*. So the maximum is nW∗nW^*.

∎

TheoremLog-optimal beats every causal strategy, almost surely

For an i.i.d. market and any causal strategy,

lim sup⁡n→∞1nlog⁡SnSn∗≤0with probability 1\limsup_{n\rightarrow\infty}\frac1n\log\frac{S_n}{S_n^*}\le0 \qquad\text{with probability 1}

ProofMarkov’s inequality on the ratio, then Borel–Cantelli

Step 1: The ratio has mean at most 1. By one-day optimality, applied day by day with independence, ESnSn∗≤1\mathbb E\frac{S_n}{S_n^*}\le1.

Step 2: Markov. By Markov’s inequality, Pr⁡(SnSn∗>tn)<1tn\Pr\big(\frac{S_n}{S_n^*} > t_n\big) < \frac1{t_n}, i.e. Pr⁡(1nlog⁡SnSn∗>1nlog⁡tn)<1tn\Pr\big(\frac1n\log\frac{S_n}{S_n^*} > \frac1n\log t_n\big) < \frac1{t_n}.

Step 3: Choose tn=n2t_n = n^2 and sum. ∑nPr⁡(1nlog⁡SnSn∗>2log⁡nn)≤∑n1n2=π26<∞\sum_n\Pr\big(\frac1n\log\frac{S_n}{S_n^*} > \frac{2\log n}n\big)\le\sum_n\frac1{n^2} = \frac{\pi^2}6 < \infty.

Step 4: Borel–Cantelli. Only finitely many of these events occur, almost surely. So eventually 1nlog⁡SnSn∗<2log⁡nn→0\frac1n\log\frac{S_n}{S_n^*} < \frac{2\log n}{n}\rightarrow0.

∎

IntuitionFirst order in the exponent

A rival may get lucky by a polynomial factor, but never by an exponential one: to first order in the exponent, nobody outgrows the log-optimal investor on almost any market path.


Side information and the growth rate

TheoremThe price of believing the wrong distribution

Let X∼f\mathbf X\sim f, with bf\mathbf b_f log-optimal for ff and bg\mathbf b_g log-optimal for some other density gg. Then

ΔW=W(bf,f)−W(bg,f)≤D(f ∥ g)\Delta W = W(\mathbf b_f, f) - W(\mathbf b_g, f)\le D(f\,\Vert\,g)

ProofInsert g/fg/f, Jensen, then Kuhn–Tucker for bg\mathbf b_g under gg

ΔW=∫flog⁡bftxbgtx=∫flog⁡(bftxbgtx⋅gf)+D(f∥g)≤(a)log⁡∫g bftxbgtx+D(f∥g)≤(b)log⁡1+D(f∥g)\Delta W = \int f\log\frac{\mathbf b_f^t\mathbf x}{\mathbf b_g^t\mathbf x} = \int f\log\left(\frac{\mathbf b_f^t\mathbf x}{\mathbf b_g^t\mathbf x}\cdot\frac{g}{f}\right) + D(f\Vert g) \overset{(a)}{\le} \log\int g\,\frac{\mathbf b_f^t\mathbf x}{\mathbf b_g^t\mathbf x} + D(f\Vert g) \overset{(b)}{\le}\log1 + D(f\Vert g)

  • (a) Jensen (log is concave), applied with weights ff.
  • (b) bg\mathbf b_g is log-optimal under gg, so by one-day optimality EgbftXbgtX≤1\mathbb E_g\frac{\mathbf b_f^t\mathbf X}{\mathbf b_g^t\mathbf X}\le1.

∎

IntuitionSame penalty, weaker statement

For the horse race, a wrong belief costs exactly D(p∥b)D(p\Vert b); for codes, D(p∥q)D(p\Vert q) bits. For a general market it costs at most D(f∥g)D(f\Vert g). Not every distributional error moves the optimal portfolio, because stocks partly hedge each other.

TheoremSide information is worth at most its mutual information

If the investor sees YY before investing in X\mathbf X, with (X,Y)∼f(x,y)(\mathbf X,Y)\sim f(\mathbf x,y), then

ΔW≤I(X;Y)\Delta W\le I(\mathbf X; Y)

with equality when the market is a horse race (Chapter 6).

ProofApply the wrong-distribution bound conditionally, then average

Given Y=yY = y, the informed investor uses the portfolio that is log-optimal for f(x∣y)f(\mathbf x\mid y), while the uninformed one uses the portfolio for f(x)f(\mathbf x). By the previous theorem, ΔWY=y≤D(f(x∣y)∥f(x))\Delta W_{Y=y}\le D\big(f(\mathbf x\mid y)\Vert f(\mathbf x)\big). Average over yy:

ΔW≤∬f(y)f(x∣y)log⁡f(x∣y)f(x)=∬f(x,y)log⁡f(x,y)f(x)f(y)=I(X;Y)\Delta W\le\iint f(y)f(\mathbf x\mid y)\log\frac{f(\mathbf x\mid y)}{f(\mathbf x)} = \iint f(\mathbf x,y)\log\frac{f(\mathbf x,y)}{f(\mathbf x)f(y)} = I(\mathbf X;Y)

∎


Investment in stationary markets

Now let X1,X2,…\mathbf X_1, \mathbf X_2, \ldots be a dependent market process, and allow causal strategies bi(Xi−1)\mathbf b_i(\mathbf X^{i-1}).

DefinitionConditional optimal growth rate

W∗(Xi∣Xi−1)=E[max⁡bE[log⁡btXi∣Xi−1]]W^*(\mathbf X_i\mid\mathbf X^{i-1}) = \mathbb E\Big[\max_{\mathbf b}\mathbb E\big[\log\mathbf b^t\mathbf X_i\mid\mathbf X^{i-1}\big]\Big]

achieved by the conditionally log-optimal portfolio bi∗(xi−1)\mathbf b_i^*(\mathbf x^{i-1}) for the distribution of Xi\mathbf X_i given the past.

TheoremChain rule for growth

W∗(X1,…,Xn)=max⁡causalElog⁡Sn=∑i=1nW∗(Xi∣X1,…,Xi−1)W^*(\mathbf X_1, \ldots, \mathbf X_n) = \max_{\text{causal}}\mathbb E\log S_n = \sum_{i=1}^nW^*(\mathbf X_i\mid\mathbf X_1, \ldots, \mathbf X_{i-1})

because Elog⁡Sn\mathbb E\log S_n splits into one term per day, and each term is maximized by the conditionally log-optimal choice.

ImportantWW is the dual of HH

This is formally the chain rule for entropy, with one reversal: conditioning reduces HH but increases WW. More knowledge of the past means less uncertainty, and more growth.

DefinitionGrowth rate of a market process

W∞∗=lim⁡n→∞W∗(X1,…,Xn)nW_\infty^* = \lim_{n\rightarrow\infty}\frac{W^*(\mathbf X_1, \ldots, \mathbf X_n)}n

if the limit exists. This is the counterpart of the entropy rate.

TheoremStationary markets have a growth rate

For a stationary market,

W∞∗=lim⁡n→∞W∗(Xn∣X1,…,Xn−1)W_\infty^* = \lim_{n\rightarrow\infty}W^*(\mathbf X_n\mid\mathbf X_1, \ldots, \mathbf X_{n-1})

ProofMonotone conditional rates, then Cesàro

By stationarity, W∗(Xn∣Xn−1)W^*(\mathbf X_n\mid\mathbf X^{n-1}) is nondecreasing in nn: more past can’t hurt, and shifting time changes nothing. So it has a limit, possibly +∞+\infty. The block average is the running mean of these terms, so by the Cesàro mean theorem it has the same limit. This mirrors the entropy-rate proof with every inequality reversed.

∎

TheoremThe wealth ratio is a supermartingale

For any market process, let Sn∗S_n^* use the conditionally log-optimal portfolios and SnS_n any causal strategy. Then Sn/Sn∗S_n/S_n^* is a positive supermartingale with respect to the past. Consequently:

  • Sn/Sn∗→VS_n/S_n^*\rightarrow V with probability 1, with EV≤1\mathbb EV\le1;
  • Pr⁡(sup⁡nSn/Sn∗≥t)≤1t\Pr\big(\sup_nS_n/S_n^*\ge t\big)\le\frac1t.
ProofOne-day optimality, conditionally on the past

E[Sn+1Sn+1∗∣Xn]=SnSn∗ E[bn+1tXn+1bn+1∗tXn+1∣Xn]≤SnSn∗\mathbb E\left[\frac{S_{n+1}}{S_{n+1}^*}\Big|\mathbf X^n\right] = \frac{S_n}{S_n^*}\,\mathbb E\left[\frac{\mathbf b_{n+1}^t\mathbf X_{n+1}}{\mathbf b_{n+1}^{*t}\mathbf X_{n+1}}\Big|\mathbf X^n\right]\le\frac{S_n}{S_n^*}

using the Kuhn–Tucker condition for the conditional distribution. The martingale convergence theorem gives the limit VV with EV≤S0/S0∗=1\mathbb EV\le S_0/S_0^* = 1. Kolmogorov’s inequality for positive supermartingales gives the bound on the supremum.

∎

IntuitionYou will probably never be 10× behind

The probability that a rival is ever, at any time, ten times richer than the conditionally log-optimal investor is at most 110\frac1{10}. This is a uniform-in-time guarantee, not just an asymptotic one.

TheoremAEP for the stock market

For a stationary ergodic market, the conditionally log-optimal wealth satisfies

1nlog⁡Sn∗⟶W∞∗with probability 1\frac1n\log S_n^*\longrightarrow W_\infty^*\quad\text{with probability 1}

The proof (Algoet–Cover) generalizes the sandwich argument of the general AEP and is omitted.

ExampleCorrelated horse races

A horse race is the market where X=okek\mathbf X = o_k\mathbf e_k when horse kk wins. The log-optimal portfolio is Kelly betting, bi∗=pib_i^* = p_i, and with uniform fair odds oi=mo_i = m, W∗=log⁡m−H(X)W^* = \log m - H(X). For a sequence of correlated races, the optimum is conditional proportional betting and

W∞∗=log⁡m−H(X),Sn∗≐2nW∞∗W_\infty^* = \log m - H(\mathcal X), \qquad S_n^*\doteq2^{nW_\infty^*}

recovering the dependent-race result.


Competitive optimality of the log-optimal portfolio

The question. Long-run growth is one criterion. Does the log-optimal investor also tend to be ahead at a fixed time nn?

TheoremMarkov bound on being beaten

By one-day optimality applied over nn days, ESnSn∗≤1\mathbb E\frac{S_n}{S_n^*}\le1, so

Pr⁡(Sn>tSn∗)≤1t\Pr(S_n > tS_n^*)\le\frac1t

This mirrors the competitive optimality of the Shannon code.

Warning“Ahead with probability at least ½” is false without randomization

Two stocks, two outcomes:

(X1,X2)={(1, 11−ϵ)with probability 1−ϵ,(1, 0)with probability ϵ.(X_1, X_2) = \begin{cases}\big(1,\ \tfrac1{1-\epsilon}\big) & \text{with probability } 1-\epsilon,\\ (1,\ 0) & \text{with probability }\epsilon.\end{cases}

Here b∗=(1,0)\mathbf b^* = (1, 0) satisfies Kuhn–Tucker: E[X2/X1]=(1−ϵ)11−ϵ=1≤1\mathbb E[X_2/X_1] = (1-\epsilon)\frac1{1-\epsilon} = 1\le1. Yet a rival who holds only stock 2 earns more with probability 1−ϵ1-\epsilon, by a small margin, and is wiped out with probability ϵ\epsilon. A rival can beat the log-optimal investor by a little, most of the time.

TheoremCompetitive optimality with fair randomization

Let S∗S^* be the log-optimal one-period wealth and SS any other portfolio’s. Let U∗∼Uniform[0,2]U^*\sim\mathrm{Uniform}[0,2] be independent of X\mathbf X, and let V≥0V\ge0 with EV=1\mathbb EV = 1 be independent of X\mathbf X and U∗U^*. Then

Pr⁡(VS≥U∗S∗)≤12\Pr\big(VS\ge U^*S^*\big)\le\frac12

IntuitionBlur small wins with a fair bet

U∗U^* and VV are fair randomizations of the initial wealth, e.g. exchanging your 1 dollar for a fair bet worth U∗U^*. They wash out small differences, so only large deviations of S/S∗S/S^* decide who wins. The game-theoretic recipe: swap your wealth for a Uniform[0,2][0,2] amount, then invest log-optimally. No opponent, whatever randomization they use, beats you more than half the time.

ProofTail-integral formula for the mean

Let W=VSS∗≥0W = \frac{VS}{S^*}\ge0. By independence and one-day optimality, EW=EV⋅ESS∗≤1\mathbb EW = \mathbb EV\cdot\mathbb E\frac S{S^*}\le1. With FF the CDF of WW and U∗U^* uniform on [0,2][0,2]:

Pr⁡(W≥U∗)=∫02Pr⁡(W>w) 12 dw≤12∫0∞(1−F(w)) dw=12EW≤12\Pr(W\ge U^*) = \int_0^2\Pr(W > w)\,\frac12\,dw\le\frac12\int_0^\infty\big(1 - F(w)\big)\,dw = \frac12\mathbb EW\le\frac12

using the tail-integral formula EW=∫0∞(1−F)\mathbb EW = \int_0^\infty(1-F).

∎


Universal portfolios

The problem. Everything above assumed the investor knows FF and can compute b∗\mathbf b^*. In practice nobody knows the market’s distribution. So make no statistical assumptions at all: the market is an arbitrary individual sequence x1,x2,…∈R+m\mathbf x_1, \mathbf x_2, \ldots\in\mathbb R_+^m, possibly chosen by an adversary. This is exactly the step from Huffman codes to universal codes.

DefinitionThe benchmark: best constant rebalanced portfolio in hindsight

Sn(b,xn)=∏i=1nbtxi,Sn∗(xn)=max⁡bSn(b,xn)S_n(\mathbf b, \mathbf x^n) = \prod_{i=1}^n\mathbf b^t\mathbf x_i, \qquad S_n^*(\mathbf x^n) = \max_{\mathbf b}S_n(\mathbf b, \mathbf x^n)

Sn∗S_n^* is what the best of a continuum of mutual funds, each running its own constant rebalanced portfolio, would have earned. It is a natural target, since constant rebalanced portfolios are exactly optimal for i.i.d. markets with known distribution. Note that b∗(xn)\mathbf b^*(\mathbf x^n) depends only on the empirical distribution of the days, not on their order.

Universal source codingUniversal portfolios
BenchmarkBest Bernoulli code in hindsight, nH(k/n)nH(k/n) bitsBest constant rebalanced portfolio in hindsight, Sn∗S_n^*
Online schemeMixture over sources (Laplace, KT)Mixture over portfolios (wealth-weighted)
Regret≈12log⁡n\approx\frac12\log n bits per parameter≈m−12log⁡n\approx\frac{m-1}2\log n in log-wealth
Minimax constantShtarkov sumVnV_n (the same Shtarkov sum)

Finite horizon: the minimax universal portfolio

TheoremMinimax ratio for a known horizon nn

For mm assets and horizon nn,

max⁡b^i(⋅) min⁡x1,…,xn S^n(xn)Sn∗(xn)=Vn,Vn=[∑n1+⋯+nm=n(nn1,…,nm)2−nH(n1n,…,nmn)]−1\max_{\hat{\mathbf b}_i(\cdot)}\ \min_{\mathbf x_1, \ldots, \mathbf x_n}\ \frac{\hat S_n(\mathbf x^n)}{S_n^*(\mathbf x^n)} = V_n, \qquad V_n = \left[\sum_{n_1 + \cdots + n_m = n}\binom{n}{n_1, \ldots, n_m}2^{-nH\left(\frac{n_1}n, \ldots, \frac{n_m}n\right)}\right]^{-1}

where the maximum is over causal strategies. By Stirling, Vn≈n−(m−1)/2V_n\approx n^{-(m-1)/2}. Losing only a polynomial factor costs nothing in the growth rate.

RemarkThe same constant as minimax data compression

log⁡1Vn\log\frac1{V_n} is Shtarkov’s minimax individual-sequence redundancy in data compression. The universal investor’s regret and the universal coder’s redundancy are literally the same number: the half-log-per-parameter cost, with m−1m-1 free parameters.

ExampleOne day, two stocks

If x1>x2x_1 > x_2 the best portfolio is all in stock 1, and vice versa. The adversary sees your portfolio, sets the stock you favour to 0 and the other to 1. Your best defence is (12,12)(\frac12, \frac12), which guarantees half the best stock’s return: V1=12V_1 = \frac12. From the formula: the two terms (n1,n2)=(1,0),(0,1)(n_1,n_2) = (1,0), (0,1) each contribute 1⋅201\cdot2^0, the sum is 2, and V1=12V_1 = \frac12.

But don’t extrapolate. Using (12,12)(\frac12,\frac12) every day for nn days loses to “stock 1 is 1, stock 2 is 0, every day” by a factor 2n2^n. The theorem shows the true worst-case loss is only polynomial, because the optimal strategy learns.

LemmaRatio of sums

For pi,qi≥0p_i, q_i\ge0:

∑ipi∑iqi≥min⁡ipiqi\frac{\sum_ip_i}{\sum_iq_i}\ge\min_i\frac{p_i}{q_i}

ProofFactor out the worst ratio

Let II minimize pi/qip_i/q_i; the edge cases pI=0p_I = 0 or qI=0q_I = 0 are trivial. Since piqi≥pIqI\frac{p_i}{q_i}\ge\frac{p_I}{q_I} implies pipI≥qiqI\frac{p_i}{p_I}\ge\frac{q_i}{q_I},

∑pi∑qi=pI(1+∑i≠Ipi/pI)qI(1+∑i≠Iqi/qI)≥pIqI\frac{\sum p_i}{\sum q_i} = \frac{p_I\big(1 + \sum_{i\ne I}p_i/p_I\big)}{q_I\big(1 + \sum_{i\ne I}q_i/q_I\big)}\ge\frac{p_I}{q_I}

∎

ProofTheorem proof (m=2m = 2): expand products into sums over stock sequences

Step 1: A product of sums is a sum of products. For any strategy,

Sn(xn)=∏i=1n(bi1xi1+bi2xi2)=∑jn∈{1,2}nw(jn) x(jn),w(jn)=∏ibiji,x(jn)=∏ixijiS_n(\mathbf x^n) = \prod_{i=1}^n(b_{i1}x_{i1} + b_{i2}x_{i2}) = \sum_{j^n\in\{1,2\}^n}w(j^n)\,x(j^n), \qquad w(j^n) = \prod_ib_{ij_i},\quad x(j^n) = \prod_ix_{ij_i}

So an nn-day market is a one-day market with 2n2^n “stocks” (sequences jnj^n). The strategy puts weight w(jn)w(j^n) on sequence jnj^n, and sequence jnj^n returns x(jn)x(j^n). The w(jn)w(j^n) sum to 1.

Step 2: Reduce to weights. By the ratio-of-sums lemma,

S^nSn∗=∑jnw^(jn)x(jn)∑jnw∗(jn)x(jn)≥min⁡jnw^(jn)w∗(jn)\frac{\hat S_n}{S_n^*} = \frac{\sum_{j^n}\hat w(j^n)x(j^n)}{\sum_{j^n}w^*(j^n)x(j^n)}\ge\min_{j^n}\frac{\hat w(j^n)}{w^*(j^n)}

Step 3: The hindsight portfolio’s weights. A constant rebalanced portfolio b=(b,1−b)\mathbf b = (b, 1-b) puts bk(1−b)n−kb^k(1-b)^{n-k} on any jnj^n with kk ones. Maximized over bb (at b=k/nb = k/n),

w∗(jn)=(kn)k(n−kn)n−k=2−nH(k/n)w^*(j^n) = \Big(\frac kn\Big)^k\Big(\frac{n-k}n\Big)^{n-k} = 2^{-nH(k/n)}

These sum to more than 1, because the hindsight investor picks a different bb for each sequence. A causal investor can’t.

Step 4: Achievability. Choose w^(jn)=Vn w∗(jn)\hat w(j^n) = V_n\,w^*(j^n). This is a valid distribution over sequences: VnV_n is exactly the normalizer, since ∑jnw∗(jn)=∑k(nk)2−nH(k/n)=1/Vn\sum_{j^n}w^*(j^n) = \sum_k\binom nk2^{-nH(k/n)} = 1/V_n. Then w^/w∗≡Vn\hat w/w^*\equiv V_n, so S^n/Sn∗≥Vn\hat S_n/S_n^*\ge V_n for every market sequence.

Step 5: Nobody does better: extremal markets. For each jnj^n, let xn(jn)\mathbf x^n(j^n) be the market where on day ii only stock jij_i pays (xi=eji\mathbf x_i = \mathbf e_{j_i}). On such a market, any strategy’s wealth is exactly w(jn)w(j^n), so ∑jnSn(xn(jn))=1\sum_{j^n}S_n(\mathbf x^n(j^n)) = 1. The hindsight optimum is Sn∗(xn(jn))=2−nH(n1/n)=w^(jn)/VnS_n^*(\mathbf x^n(j^n)) = 2^{-nH(n_1/n)} = \hat w(j^n)/V_n, and these sum to 1/Vn1/V_n. A minimum is at most a weighted average, so

min⁡xn∈KSn(xn)Sn∗(xn)≤∑KSn∑KSn∗=11/Vn=Vn\min_{\mathbf x^n\in K}\frac{S_n(\mathbf x^n)}{S_n^*(\mathbf x^n)}\le\frac{\sum_KS_n}{\sum_KS_n^*} = \frac1{1/V_n} = V_n

The proof extends directly to m>2m > 2.

∎

FormulaThe optimal strategy, run day by day

The weights w^(jn)\hat w(j^n) define the strategy causally. The fraction in stock 1 on day ii is

b^i,1(xi−1)=∑ji−1w^(ji−11) x(ji−1)∑jiw^(ji) x(ji−1)\hat b_{i,1}(\mathbf x^{i-1}) = \frac{\sum_{j^{i-1}}\hat w(j^{i-1}1)\,x(j^{i-1})}{\sum_{j^i}\hat w(j^i)\,x(j^{i-1})}

where w^(ji)\hat w(j^i) is the total weight on sequences that start with jij^i.

FormulaSize of the universality cost

Vn∼(2n)m−12Γ(m/2)π;m=2:  Vn∼2πn,12n+1≤Vn≤2n+1V_n\sim\left(\frac2n\right)^{\frac{m-1}2}\frac{\Gamma(m/2)}{\sqrt\pi}; \qquad m = 2:\ \ V_n\sim\sqrt{\frac2{\pi n}},\qquad\frac1{2\sqrt{n+1}}\le V_n\le\frac2{\sqrt{n+1}}

Horizon-free universal portfolios

The problem. The minimax strategy depends on the horizon nn. We want a strategy that doesn’t need to know nn, just as the Laplace estimator was horizon-free.

DefinitionCover’s universal portfolio

Give each constant-rebalanced “fund manager” b\mathbf b an initial slice dμ(b)d\mu(\mathbf b) of your wealth. Each morning, hold the performance-weighted average of all their portfolios:

b^i+1(xi)=∫Bb Si(b,xi) dμ(b)∫BSi(b,xi) dμ(b)\hat{\mathbf b}_{i+1}(\mathbf x^i) = \frac{\int_{\mathcal B}\mathbf b\,S_i(\mathbf b,\mathbf x^i)\,d\mu(\mathbf b)}{\int_{\mathcal B}S_i(\mathbf b,\mathbf x^i)\,d\mu(\mathbf b)}

TheoremThe universal portfolio earns the mixture of all funds’ wealth

S^n(xn)=∏i=1nb^itxi=∫BSn(b,xn) dμ(b)\hat S_n(\mathbf x^n) = \prod_{i=1}^n\hat{\mathbf b}_i^t\mathbf x_i = \int_{\mathcal B}S_n(\mathbf b,\mathbf x^n)\,d\mu(\mathbf b)

ProofThe daily factors telescope

b^i+1txi+1=∫btxi+1Si(b,xi) dμ∫Si(b,xi) dμ=∫Si+1(b,xi+1) dμ∫Si(b,xi) dμ\hat{\mathbf b}_{i+1}^t\mathbf x_{i+1} = \frac{\int\mathbf b^t\mathbf x_{i+1}S_i(\mathbf b,\mathbf x^i)\,d\mu}{\int S_i(\mathbf b,\mathbf x^i)\,d\mu} = \frac{\int S_{i+1}(\mathbf b,\mathbf x^{i+1})\,d\mu}{\int S_i(\mathbf b,\mathbf x^i)\,d\mu}

so the product over days collapses to ∫Sn dμ\int S_n\,d\mu (with S0=1S_0 = 1).

∎

IntuitionA fund of funds that never rebalances between managers

Hand manager b\mathbf b the amount dμ(b)d\mu(\mathbf b) and let them run. Total wealth is ∫Sn(b) dμ(b)\int S_n(\mathbf b)\,d\mu(\mathbf b). The exponentially best managers come to dominate the integral, so the total tracks the best one. b^i+1\hat{\mathbf b}_{i+1} is simply the combined “buy order” of all managers, weighted by their current wealth. This is the Bayesian mixture idea, with wealth in place of probability.

LemmaBound for any initial weighting μ\mu

S^n(xn)Sn∗(xn)≥min⁡jn∫B∏i=1nbji dμ(b)∏i=1nbji∗\frac{\hat S_n(\mathbf x^n)}{S_n^*(\mathbf x^n)}\ge\min_{j^n}\frac{\int_{\mathcal B}\prod_{i=1}^nb_{j_i}\,d\mu(\mathbf b)}{\prod_{i=1}^nb_{j_i}^*}

Same proof as before: expand both wealths as sums over jnj^n, with w^(jn)=∫∏ibji dμ\hat w(j^n) = \int\prod_ib_{j_i}\,d\mu, and apply the ratio-of-sums lemma.

TheoremDirichlet(12,12)(\frac12,\frac12) universal portfolio

For m=2m = 2 and dμ(b)=1πb(1−b) dbd\mu(b) = \frac1{\pi\sqrt{b(1-b)}}\,db (the fraction bb in stock 1),

S^n(xn)Sn∗(xn)≥12n+1for all n and all market sequences\frac{\hat S_n(\mathbf x^n)}{S_n^*(\mathbf x^n)}\ge\frac1{2\sqrt{n+1}}\qquad\text{for all } n \text{ and all market sequences}

ProofBeta integrals against the hindsight weights

Step 1: Hindsight weight. For jnj^n with ll ones, ∏ibji∗=2−nH(l/n)\prod_ib_{j_i}^* = 2^{-nH(l/n)}.

Step 2: Mixture weight.

∫01bl(1−b)n−ldbπb(1−b)=1πB(l+12, n−l+12),B(l+12,n−l+12)=π22n⋅(2nn)(nl)(2n2l)\int_0^1b^l(1-b)^{n-l}\frac{db}{\pi\sqrt{b(1-b)}} = \frac1\pi B\Big(l + \frac12,\ n - l + \frac12\Big), \qquad B\Big(l + \frac12, n - l + \frac12\Big) = \frac{\pi}{2^{2n}}\cdot\frac{\binom{2n}{n}\binom nl}{\binom{2n}{2l}}

using B(λ1,λ2)=Γ(λ1)Γ(λ2)Γ(λ1+λ2)B(\lambda_1,\lambda_2) = \frac{\Gamma(\lambda_1)\Gamma(\lambda_2)}{\Gamma(\lambda_1+\lambda_2)} and Γ(n+12)=1⋅3⋯(2n−1)2nπ\Gamma(n+\frac12) = \frac{1\cdot3\cdots(2n-1)}{2^n}\sqrt\pi. Check: n=1n = 1, l=0l = 0 gives B(12,32)=π2B(\frac12,\frac32) = \frac\pi2 both ways.

Step 3: Combine. By the lemma, S^n/Sn∗≥min⁡lB(l+12,n−l+12)/π2−nH(l/n)≥12n+1\hat S_n/S_n^*\ge\min_l\frac{B(l+\frac12, n-l+\frac12)/\pi}{2^{-nH(l/n)}}\ge\frac1{2\sqrt{n+1}}, the last step being a result of Cover and Ordentlich.

∎

ImportantUniversality is free in the exponent

The Dirichlet(12)(\frac12) prior is the KT prior again. It gives S^n/Sn∗≥12πVn\hat S_n/S_n^*\ge\frac1{\sqrt{2\pi}}V_n for every nn: horizon-free performance costs at most a constant factor over the horizon-specific minimax strategy. And since 1nln⁡Vn2π→0\frac1n\ln\frac{V_n}{\sqrt{2\pi}}\rightarrow0,

1nln⁡S^n(xn)−1nln⁡Sn∗(xn)≥1nln⁡Vn2π⟶0\frac1n\ln\hat S_n(\mathbf x^n) - \frac1n\ln S_n^*(\mathbf x^n)\ge\frac1n\ln\frac{V_n}{\sqrt{2\pi}}\longrightarrow0

On every market sequence, the universal portfolio grows at the same asymptotic rate as the best constant rebalanced portfolio chosen in hindsight.

ExampleHewlett-Packard and Altria, 14 years ending 2004

StrategyGrowth factor
Buy and hold HP11.8
Buy and hold Altria11.5
Best constant rebalanced portfolio (about 51% HP / 49% Altria), hindsight only18.7
Universal portfolio, no foreknowledge15.7

Rebalancing between two stocks that each grew about 11.6-fold produced 18.7-fold growth. The universal portfolio captured most of that without knowing the best mix in advance.


The Shannon–McMillan–Breiman theorem (general AEP)

The entropy-rates note borrowed the AEP for stationary ergodic processes and deferred its proof to here. The proof is a gambling argument.

DefinitionStationary ergodic process (measure-theoretic)

A probability space (Ω,B,P)(\Omega,\mathcal B,P), a random variable X(ω)X(\omega), and a time shift T:Ω→ΩT:\Omega\rightarrow\Omega:

  • TT is stationary if P(TA)=P(A)P(TA) = P(A) for all events AA;
  • TT is ergodic if every invariant set (TA=ATA = A a.e.) has P(A)∈{0,1}P(A)\in\{0,1\}.

The process Xn(ω)=X(Tnω)X_n(\omega) = X(T^n\omega) is then stationary and ergodic. For a finite alphabet, ergodicity is equivalent to every kk-th-order empirical distribution converging to its true marginal.

TheoremBirkhoff’s ergodic theorem

For a stationary ergodic process, 1n∑i=1nXi→EX\frac1n\sum_{i=1}^nX_i\rightarrow\mathbb EX with probability 1. Ergodic processes are, roughly, the most general dependent processes obeying the strong law of large numbers.

WarningThe obvious approach doesn’t apply directly

We want −1nlog⁡p(X0n−1)=−1n∑ilog⁡p(Xi∣X0i−1)→H-\frac1n\log p(X_0^{n-1}) = -\frac1n\sum_i\log p(X_i\mid X_0^{i-1})\rightarrow H. But the terms p(Xi∣X0i−1)p(X_i\mid X_0^{i-1}) condition on a growing past, so they don’t form an ergodic sequence, and Birkhoff can’t be applied to them.

DefinitionBounded-memory and infinite-memory entropies

Hk=E[−log⁡p(X0∣X−1,…,X−k)],H∞=E[−log⁡p(X0∣X−1,X−2,…)]H^k = \mathbb E\big[-\log p(X_0\mid X_{-1}, \ldots, X_{-k})\big], \qquad H^\infty = \mathbb E\big[-\log p(X_0\mid X_{-1}, X_{-2}, \ldots)\big]

The conditionals p(Xi∣Xi−ki−1)p(X_i\mid X_{i-k}^{i-1}) (fixed memory kk) and p(Xi∣X−∞i−1)p(X_i\mid X_{-\infty}^{i-1}) (the whole infinite past) are ergodic sequences. By stationarity, Hk↓HH^k\downarrow H.

IntuitionThree gamblers

At uniform odds, a gambler who remembers the last kk results grows at log⁡∣X∣−Hk\log|\mathcal X| - H^k. One who knows the infinite past grows at log⁡∣X∣−H∞\log|\mathcal X| - H^\infty. The real gambler, whose knowledge of the past grows over time, is sandwiched between the two. If Hk↓H∞H^k\downarrow H^\infty, the sandwich closes and the real gambler’s rate is log⁡∣X∣−H\log|\mathcal X| - H.

flowchart LR
  A["k-step memory: upper bound H k"] --> M["Actual: minus one over n times log p of the block"]
  B["Infinite memory: lower bound H infinity"] --> M
  M --> R["Squeezed to H, because H k decreases to H infinity which equals H"]

LemmaMarkov approximations obey the ergodic theorem

Let pk(X0n−1)=p(X0k−1)∏i=kn−1p(Xi∣Xi−ki−1)p^k(X_0^{n-1}) = p(X_0^{k-1})\prod_{i=k}^{n-1}p(X_i\mid X_{i-k}^{i-1}). Then, with probability 1,

−1nlog⁡pk(X0n−1)→Hk,−1nlog⁡p(X0n−1∣X−∞−1)→H∞-\frac1n\log p^k(X_0^{n-1})\rightarrow H^k, \qquad -\frac1n\log p(X_0^{n-1}\mid X_{-\infty}^{-1})\rightarrow H^\infty

ProofFixed-window functions of an ergodic process are ergodic

log⁡p(Xn∣Xn−kn−1)\log p(X_n\mid X_{n-k}^{n-1}) and log⁡p(Xn∣X−∞n−1)\log p(X_n\mid X_{-\infty}^{n-1}) are fixed functions of the shifted process, so they are ergodic. Birkhoff gives the limits. The initial term −1nlog⁡p(X0k−1)→0-\frac1n\log p(X_0^{k-1})\rightarrow0.

∎

LemmaNo gap: Hk↓H∞H^k\downarrow H^\infty, so H=H∞H = H^\infty

By Lévy’s martingale convergence theorem, p(x0∣X−k−1)→p(x0∣X−∞−1)p(x_0\mid X_{-k}^{-1})\rightarrow p(x_0\mid X_{-\infty}^{-1}) almost surely for each x0x_0. The alphabet is finite and plog⁡pp\log p is bounded and continuous on [0,1][0,1], so bounded convergence lets the limit pass inside the expectation: Hk→H∞H^k\rightarrow H^\infty. Combined with Hk↓HH^k\downarrow H, this gives H=H∞H = H^\infty.

LemmaSandwich

With probability 1,

lim sup⁡n1nlog⁡pk(X0n−1)p(X0n−1)≤0,lim sup⁡n1nlog⁡p(X0n−1)p(X0n−1∣X−∞−1)≤0\limsup_n\frac1n\log\frac{p^k(X_0^{n-1})}{p(X_0^{n-1})}\le0, \qquad \limsup_n\frac1n\log\frac{p(X_0^{n-1})}{p(X_0^{n-1}\mid X_{-\infty}^{-1})}\le0

ProofEach ratio has mean at most 1; then Markov and Borel–Cantelli

Step 1: Means. Summing over the support AA of pp, Epk(X0n−1)p(X0n−1)=∑Apk=pk(A)≤1\mathbb E\frac{p^k(X_0^{n-1})}{p(X_0^{n-1})} = \sum_Ap^k = p^k(A)\le1. Conditioning on the infinite past and summing over the conditional support likewise gives Ep(X0n−1)p(X0n−1∣X−∞−1)≤1\mathbb E\frac{p(X_0^{n-1})}{p(X_0^{n-1}\mid X_{-\infty}^{-1})}\le1.

Step 2: Markov with tn=n2t_n = n^2. Pr⁡(1nlog⁡ratio≥1nlog⁡n2)≤1n2\Pr\big(\frac1n\log\text{ratio}\ge\frac1n\log n^2\big)\le\frac1{n^2}, which is summable. By Borel–Cantelli the event occurs only finitely often, and 2log⁡nn→0\frac{2\log n}n\rightarrow0.

This is the same Markov-plus-Borel–Cantelli argument as log-optimal asymptotic optimality: a ratio with mean at most 1 can’t grow exponentially.

∎

TheoremShannon–McMillan–Breiman

For a finite-valued stationary ergodic process with entropy rate HH,

−1nlog⁡p(X0,…,Xn−1)⟶Hwith probability 1-\frac1n\log p(X_0, \ldots, X_{n-1})\longrightarrow H\qquad\text{with probability 1}

ProofClose the sandwich

From the first sandwich inequality and the Markov-approximation lemma, lim sup⁡n−1nlog⁡p(X0n−1)≤lim⁡n−1nlog⁡pk(X0n−1)=Hk\limsup_n-\frac1n\log p(X_0^{n-1})\le\lim_n-\frac1n\log p^k(X_0^{n-1}) = H^k for every kk. From the second, lim inf⁡n−1nlog⁡p(X0n−1)≥H∞\liminf_n-\frac1n\log p(X_0^{n-1})\ge H^\infty. So

H∞≤lim inf⁡≤lim sup⁡≤Hkfor all kH^\infty\le\liminf\le\limsup\le H^k\quad\text{for all } k

Let k→∞k\rightarrow\infty. By the no-gap lemma Hk→H∞=HH^k\rightarrow H^\infty = H, so both limits equal HH. (Algoet and Cover give the countable-alphabet and density versions, and the same argument proves the AEP for the stock market.)

∎


Quick reference

ObjectStatementReads as
Wealth relativeS=btXS = \mathbf b^t\mathbf XToday’s multiplier.
Growth rateW(b,F)=Elog⁡btXW(\mathbf b,F) = \mathbb E\log\mathbf b^t\mathbf XConcave in b\mathbf b, linear in FF.
GrowthSn∗≐2nW∗S_n^*\doteq2^{nW^*} a.s.Constant rebalancing, strong law.
Kuhn–TuckerEXib∗tX=1\mathbb E\frac{X_i}{\mathbf b^{*t}\mathbf X} = 1 if held, ≤1\le1 if notHeld stocks break even against the portfolio.
One-day optimalityESS∗≤1\mathbb E\frac S{S^*}\le1No one expects to beat b∗\mathbf b^*.
Asymptotic optimalitylim sup⁡1nlog⁡SnSn∗≤0\limsup\frac1n\log\frac{S_n}{S_n^*}\le0 a.s.Markov + Borel–Cantelli.
Wrong distributionΔW≤D(f∥g)\Delta W\le D(f\Vert g)Equality for horse races.
Side informationΔW≤I(X;Y)\Delta W\le I(\mathbf X;Y)
Chain ruleW∗(Xn)=∑iW∗(Xi∣Xi−1)W^*(\mathbf X^n) = \sum_iW^*(\mathbf X_i\mid\mathbf X^{i-1})Conditioning increases WW.
Stationary growth rateW∞∗=lim⁡W∗(Xn∣Xn−1)W_\infty^* = \lim W^*(\mathbf X_n\mid\mathbf X^{n-1})Cesàro.
SupermartingalePr⁡(sup⁡Sn/Sn∗≥t)≤1t\Pr(\sup S_n/S_n^*\ge t)\le\frac1tUniform in time.
Market AEP1nlog⁡Sn∗→W∞∗\frac1n\log S_n^*\rightarrow W_\infty^* a.s.Stationary ergodic.
CompetitivePr⁡(VS≥U∗S∗)≤12\Pr(VS\ge U^*S^*)\le\frac12Fair randomization.
Minimax universalmax⁡min⁡S^n/Sn∗=Vn≈n−(m−1)/2\max\min\hat S_n/S_n^* = V_n\approx n^{-(m-1)/2}Shtarkov factor.
m=2m = 2Vn∼2/(πn)V_n\sim\sqrt{2/(\pi n)}
Cover’s portfolioS^n=∫Sn(b) dμ(b)\hat S_n = \int S_n(\mathbf b)\,d\mu(\mathbf b)Fund of funds.
Dirichlet(12)(\frac12)S^n/Sn∗≥12n+1\hat S_n/S_n^*\ge\frac1{2\sqrt{n+1}}Horizon-free KT portfolio.
Shannon–McMillan–Breiman−1nlog⁡p(Xn)→H-\frac1n\log p(X^n)\rightarrow H a.s.H∞≤⋅≤HkH^\infty\le\cdot\le H^k sandwich.

Facts to keep to hand

  • Products need logs. Reinvested wealth multiplies, so long-run growth is Elog⁡\mathbb E\log, not E\mathbb E. Mean–variance theory optimizes the wrong quantity for a reinvesting investor.
  • One inequality drives everything. E[S/S∗]≤1\mathbb E[S/S^*]\le1 gives one-day optimality. Markov plus Borel–Cantelli turn it into asymptotic optimality, martingale theory into a uniform-in-time bound, and the tail formula into competitive optimality.
  • WW is the dual of HH. Kelly is the horse-race special case, the chain rule carries over with conditioning reversed, and every distributional error or piece of side information is priced by relative entropy or mutual information (exactly for horse races, as an upper bound for general markets).
  • Universal investing is universal coding. The best constant rebalanced portfolio in hindsight plays the role of the best code in hindsight. Wealth mixtures play the role of probability mixtures, and the regret VnV_n is the same Shtarkov redundancy as in coding.
  • The general AEP is a gambling sandwich. Bounded-memory and infinite-memory gamblers bracket the real one, and Lévy’s martingale theorem closes the gap.

References

← All notes