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
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 race | Stock market |
|---|---|
| Kelly bet | Log-optimal portfolio (no closed form; Kuhn–Tucker conditions) |
| Side information is worth exactly | Side information is worth at most |
| Conservation: | Chain rule for , the dual of the chain rule for |
| Shannon code is competitively optimal | Log-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: , with the price relative of stock : end-of-day price divided by start-of-day price. For example, means up 3% today. , a joint distribution.
- Portfolio: , , , the fraction of wealth in each stock. The set of portfolios is the simplex .
- Wealth relative: , the factor by which wealth changes today.
| Component | Detail |
|---|---|
| Signature | |
| Inputs | A portfolio and today’s price relatives. |
| Output | Today’s wealth multiplier. |
| Horse-race special case | when horse wins, so . |
Why mean–variance is the wrong objective
RemarkSharpe–Markowitz theory
Standard practice optimizes the first two moments of : maximize subject to a cap on . 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 , 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
This is the doubling rate if the log is base 2. The optimal growth rate is , and any maximizer is a log-optimal (growth-optimal) portfolio.
| Component | Detail |
|---|---|
| Signature | |
| Domain | A portfolio and a market distribution. |
| Codomain | Expected log-growth per day. |
TheoremWealth grows at the optimal rate
If are i.i.d. and (a constant rebalanced portfolio: rebalance to every morning), then
ProofStrong law on the log returns
, a sample mean of i.i.d. terms, which converges to 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 : 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
- is concave in and linear in .
- is convex in .
ProofLog is concave; integrals are linear; a max of linear functions is convex
Linear in : is an integral against .
Concave in : pointwise. Take expectations.
Convex in : let be log-optimal for . By linearity in ,
since no single portfolio beats each market’s own optimum.
∎
IntuitionWhy convex in 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 are both log-optimal, concavity gives , so the mixture is log-optimal too.
Kuhn–Tucker characterization of the log-optimal portfolio
The problem. The horse race had the closed form . 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
is log-optimal for iff
IntuitionA held stock earns exactly the portfolio’s own return
is how stock 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. is concave on the simplex, so is optimal iff, for every , the one-sided derivative along at is .
Step 2: Compute the derivative.
Dominated convergence justifies swapping the limit and the expectation. So the test is for all .
Step 3: Vertices suffice. The expression is linear in , so checking the vertices is enough: for every .
Step 4: Equality for held stocks. If , the segment from through extends beyond inside the simplex. Then the two-sided derivative exists and must vanish, which forces equality. If , the segment can’t extend, and only the inequality is required.
∎
TheoremOne-day optimality
With and for any other portfolio:
ProofAverage the Kuhn–Tucker inequalities; Jensen for the converse
(⇒) Multiply by and sum over : .
(⇐) By Jensen, .
∎
ImportantThe log-optimal portfolio wins on ratios, not just logs
Maximizing was motivated by long-run growth. But it also gives for every competitor , 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 . At the end of the day, the fraction of wealth in stock is , and by Kuhn–Tucker its expectation is . 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 : the portfolio for day may depend on but not on the future.
LemmaConstant rebalancing maximizes expected log wealth (i.i.d. market)
For any causal strategy with wealth , .
ProofThe problem splits day by day
. Each term is maximized separately. Since is independent of the past, the best day- choice ignores the past and equals . So the maximum is .
∎
TheoremLog-optimal beats every causal strategy, almost surely
For an i.i.d. market and any causal strategy,
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, .
Step 2: Markov. By Markov’s inequality, , i.e. .
Step 3: Choose and sum. .
Step 4: Borel–Cantelli. Only finitely many of these events occur, almost surely. So eventually .
∎
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 , with log-optimal for and log-optimal for some other density . Then
ProofInsert , Jensen, then Kuhn–Tucker for under
- (a) Jensen (log is concave), applied with weights .
- (b) is log-optimal under , so by one-day optimality .
∎
IntuitionSame penalty, weaker statement
For the horse race, a wrong belief costs exactly ; for codes, bits. For a general market it costs at most . 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 before investing in , with , then
with equality when the market is a horse race (Chapter 6).
ProofApply the wrong-distribution bound conditionally, then average
Given , the informed investor uses the portfolio that is log-optimal for , while the uninformed one uses the portfolio for . By the previous theorem, . Average over :
∎
Investment in stationary markets
Now let be a dependent market process, and allow causal strategies .
DefinitionConditional optimal growth rate
achieved by the conditionally log-optimal portfolio for the distribution of given the past.
TheoremChain rule for growth
because splits into one term per day, and each term is maximized by the conditionally log-optimal choice.
Important is the dual of
This is formally the chain rule for entropy, with one reversal: conditioning reduces but increases . More knowledge of the past means less uncertainty, and more growth.
DefinitionGrowth rate of a market process
if the limit exists. This is the counterpart of the entropy rate.
TheoremStationary markets have a growth rate
For a stationary market,
ProofMonotone conditional rates, then Cesàro
By stationarity, is nondecreasing in : more past can’t hurt, and shifting time changes nothing. So it has a limit, possibly . 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 use the conditionally log-optimal portfolios and any causal strategy. Then is a positive supermartingale with respect to the past. Consequently:
- with probability 1, with ;
- .
ProofOne-day optimality, conditionally on the past
using the Kuhn–Tucker condition for the conditional distribution. The martingale convergence theorem gives the limit with . 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 . 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
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 when horse wins. The log-optimal portfolio is Kelly betting, , and with uniform fair odds , . For a sequence of correlated races, the optimum is conditional proportional betting and
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 ?
TheoremMarkov bound on being beaten
By one-day optimality applied over days, , so
This mirrors the competitive optimality of the Shannon code.
Warning“Ahead with probability at least ½” is false without randomization
Two stocks, two outcomes:
Here satisfies Kuhn–Tucker: . Yet a rival who holds only stock 2 earns more with probability , by a small margin, and is wiped out with probability . A rival can beat the log-optimal investor by a little, most of the time.
TheoremCompetitive optimality with fair randomization
Let be the log-optimal one-period wealth and any other portfolio’s. Let be independent of , and let with be independent of and . Then
IntuitionBlur small wins with a fair bet
and are fair randomizations of the initial wealth, e.g. exchanging your 1 dollar for a fair bet worth . They wash out small differences, so only large deviations of decide who wins. The game-theoretic recipe: swap your wealth for a Uniform 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 . By independence and one-day optimality, . With the CDF of and uniform on :
using the tail-integral formula .
∎
Universal portfolios
The problem. Everything above assumed the investor knows and can compute . In practice nobody knows the market’s distribution. So make no statistical assumptions at all: the market is an arbitrary individual sequence , possibly chosen by an adversary. This is exactly the step from Huffman codes to universal codes.
DefinitionThe benchmark: best constant rebalanced portfolio in hindsight
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 depends only on the empirical distribution of the days, not on their order.
| Universal source coding | Universal portfolios | |
|---|---|---|
| Benchmark | Best Bernoulli code in hindsight, bits | Best constant rebalanced portfolio in hindsight, |
| Online scheme | Mixture over sources (Laplace, KT) | Mixture over portfolios (wealth-weighted) |
| Regret | bits per parameter | in log-wealth |
| Minimax constant | Shtarkov sum | (the same Shtarkov sum) |
Finite horizon: the minimax universal portfolio
TheoremMinimax ratio for a known horizon
For assets and horizon ,
where the maximum is over causal strategies. By Stirling, . Losing only a polynomial factor costs nothing in the growth rate.
RemarkThe same constant as minimax data compression
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 free parameters.
ExampleOne day, two stocks
If 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 , which guarantees half the best stock’s return: . From the formula: the two terms each contribute , the sum is 2, and .
But don’t extrapolate. Using every day for days loses to “stock 1 is 1, stock 2 is 0, every day” by a factor . The theorem shows the true worst-case loss is only polynomial, because the optimal strategy learns.
LemmaRatio of sums
For :
ProofFactor out the worst ratio
Let minimize ; the edge cases or are trivial. Since implies ,
∎
ProofTheorem proof (): expand products into sums over stock sequences
Step 1: A product of sums is a sum of products. For any strategy,
So an -day market is a one-day market with “stocks” (sequences ). The strategy puts weight on sequence , and sequence returns . The sum to 1.
Step 2: Reduce to weights. By the ratio-of-sums lemma,
Step 3: The hindsight portfolio’s weights. A constant rebalanced portfolio puts on any with ones. Maximized over (at ),
These sum to more than 1, because the hindsight investor picks a different for each sequence. A causal investor can’t.
Step 4: Achievability. Choose . This is a valid distribution over sequences: is exactly the normalizer, since . Then , so for every market sequence.
Step 5: Nobody does better: extremal markets. For each , let be the market where on day only stock pays (). On such a market, any strategy’s wealth is exactly , so . The hindsight optimum is , and these sum to . A minimum is at most a weighted average, so
The proof extends directly to .
∎
FormulaThe optimal strategy, run day by day
The weights define the strategy causally. The fraction in stock 1 on day is
where is the total weight on sequences that start with .
FormulaSize of the universality cost
Horizon-free universal portfolios
The problem. The minimax strategy depends on the horizon . We want a strategy that doesn’t need to know , just as the Laplace estimator was horizon-free.
DefinitionCover’s universal portfolio
Give each constant-rebalanced “fund manager” an initial slice of your wealth. Each morning, hold the performance-weighted average of all their portfolios:
TheoremThe universal portfolio earns the mixture of all funds’ wealth
ProofThe daily factors telescope
so the product over days collapses to (with ).
∎
IntuitionA fund of funds that never rebalances between managers
Hand manager the amount and let them run. Total wealth is . The exponentially best managers come to dominate the integral, so the total tracks the best one. 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
Same proof as before: expand both wealths as sums over , with , and apply the ratio-of-sums lemma.
TheoremDirichlet universal portfolio
For and (the fraction in stock 1),
ProofBeta integrals against the hindsight weights
Step 1: Hindsight weight. For with ones, .
Step 2: Mixture weight.
using and . Check: , gives both ways.
Step 3: Combine. By the lemma, , the last step being a result of Cover and Ordentlich.
∎
ImportantUniversality is free in the exponent
The Dirichlet prior is the KT prior again. It gives for every : horizon-free performance costs at most a constant factor over the horizon-specific minimax strategy. And since ,
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
| Strategy | Growth factor |
|---|---|
| Buy and hold HP | 11.8 |
| Buy and hold Altria | 11.5 |
| Best constant rebalanced portfolio (about 51% HP / 49% Altria), hindsight only | 18.7 |
| Universal portfolio, no foreknowledge | 15.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 , a random variable , and a time shift :
- is stationary if for all events ;
- is ergodic if every invariant set ( a.e.) has .
The process is then stationary and ergodic. For a finite alphabet, ergodicity is equivalent to every -th-order empirical distribution converging to its true marginal.
TheoremBirkhoff’s ergodic theorem
For a stationary ergodic process, 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 . But the terms 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
The conditionals (fixed memory ) and (the whole infinite past) are ergodic sequences. By stationarity, .
IntuitionThree gamblers
At uniform odds, a gambler who remembers the last results grows at . One who knows the infinite past grows at . The real gambler, whose knowledge of the past grows over time, is sandwiched between the two. If , the sandwich closes and the real gambler’s rate is .
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 . Then, with probability 1,
ProofFixed-window functions of an ergodic process are ergodic
and are fixed functions of the shifted process, so they are ergodic. Birkhoff gives the limits. The initial term .
∎
LemmaNo gap: , so
By Lévy’s martingale convergence theorem, almost surely for each . The alphabet is finite and is bounded and continuous on , so bounded convergence lets the limit pass inside the expectation: . Combined with , this gives .
LemmaSandwich
With probability 1,
ProofEach ratio has mean at most 1; then Markov and Borel–Cantelli
Step 1: Means. Summing over the support of , . Conditioning on the infinite past and summing over the conditional support likewise gives .
Step 2: Markov with . , which is summable. By Borel–Cantelli the event occurs only finitely often, and .
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 ,
ProofClose the sandwich
From the first sandwich inequality and the Markov-approximation lemma, for every . From the second, . So
Let . By the no-gap lemma , so both limits equal . (Algoet and Cover give the countable-alphabet and density versions, and the same argument proves the AEP for the stock market.)
∎
Quick reference
| Object | Statement | Reads as |
|---|---|---|
| Wealth relative | Today’s multiplier. | |
| Growth rate | Concave in , linear in . | |
| Growth | a.s. | Constant rebalancing, strong law. |
| Kuhn–Tucker | if held, if not | Held stocks break even against the portfolio. |
| One-day optimality | No one expects to beat . | |
| Asymptotic optimality | a.s. | Markov + Borel–Cantelli. |
| Wrong distribution | Equality for horse races. | |
| Side information | ||
| Chain rule | Conditioning increases . | |
| Stationary growth rate | Cesàro. | |
| Supermartingale | Uniform in time. | |
| Market AEP | a.s. | Stationary ergodic. |
| Competitive | Fair randomization. | |
| Minimax universal | Shtarkov factor. | |
| Cover’s portfolio | Fund of funds. | |
| Dirichlet | Horizon-free KT portfolio. | |
| Shannon–McMillan–Breiman | a.s. | sandwich. |
Facts to keep to hand
- Products need logs. Reinvested wealth multiplies, so long-run growth is , not . Mean–variance theory optimizes the wrong quantity for a reinvesting investor.
- One inequality drives everything. 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.
- is the dual of . 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 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
- Cover & Thomas, Elements of Information Theory — Chapter 16