Portfolio & Risk

The Best Portfolio, Had We Known the Future

Searching past data for the best weights of a rebalanced portfolio, tested on 100 years of US industry returns and their 3× versions: why the search finds a single peak, why maximizing past growth bets everything on the last winner, and what to optimize instead.


Does research lead to applications, or do applications lead to research? It is the chicken and the egg, and the most interesting work happens when the two go together.

Meir Liraz’s well-known Hebrew investing book The Monkey That Beat the Investment Experts (named after a randomly chosen portfolio that finished ahead of professional teams in an Israeli newspaper’s investment game) describes a very simple strategy for managing a portfolio. Fix in advance a share for each part of the portfolio, say 60% in one fund and 40% in another, and from time to time rebalance: sell some of what has grown beyond its share and buy some of what has fallen below it, until the shares are back at their targets. The appeal is that the rule makes us sell after rises and buy after falls. When one part rose and another fell this is obvious, but it holds even when everything moved together: the rule always trims the part that gained most and adds to the part that gained least. If the market rises in the long run, we keep selling high and buying low.

In May 2025 I took the parts of my own portfolio and asked the natural next question: which weights would have worked best? I searched the past data with an algorithm in the spirit of gradient ascent, the method that finds the top of a function by repeatedly stepping in the direction where it rises fastest. The image I had in mind was a climber trying to reach the top of a mountain of profits while blindfolded: we cannot see the mountain, only feel the slope under our feet, so we step in the steepest direction, feel again, and repeat. The idea met quite a few problems once it was implemented, and they turned into four questions:

  1. How do we choose the directions of the steps, so that they fit portfolio weights?
  2. How do we avoid getting stuck on a lower peak?
  3. Why does maximizing the profit at the end of the period lead to weights that do not help us?
  4. If maximizing end-of-period profit is wrong, what should we maximize?

A reader replied that markets are unpredictable and that sudden events, a tweet or a politician’s announcement, move prices sharply. My answer then is the thesis of this article: the weights such a search returns are “what would have been the most effective thing to do in the past, had we known what the future held”. They do not necessarily help predict the future, but they can give interesting insights. This article answers the four questions with numbers, on 100 years of real data. It does not use my own portfolio. It uses the ten US industry portfolios of the Kenneth R. French Data Library and leveraged 3× versions of them built from their real daily returns.

Why rebalancing sells high and buys low

Take two industries and a fixed split between them, rebalanced at the end of every month. For each split we can compute how fast the portfolio would have grown from 1927 to 2026. Figure 1 does this for every split from 0% to 100%, for two pairs.

Figure 1. With monthly rebalancing, every split between two industries has one growth rate, and the curve has a single peak. For Health and Energy the peak is inside, at 71% Health, and the mixture grows faster (11.74% a year) than either industry alone (11.55% and 10.60%). For Technology and Utilities the peak is at the edge, all Technology. The dashed line starts from the same split but never rebalances. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios, monthly returns 1927–2026 including dividends; no costs.

On the left, the rebalanced mixture beats both of its parts. This is not a trick of the data. Each month the portfolio’s return is the weighted average of its parts’ returns, but growth over many months depends on the average and on how much the returns jump around: a fall of 50% followed by a rise of 50% leaves 75, not 100. Mixing two industries that do not move together smooths the portfolio’s path, and rebalancing keeps the mixture in place, so the portfolio loses less to that jumping around than its parts do. When the parts grow at similar rates, as Health and Energy did, the gain from smoothing can more than make up for holding some of the slower one.

On the right the faster industry grew so much faster that no amount of smoothing helped: the peak is at 100% Technology. And the dashed line shows what happens without rebalancing: the weights drift toward whatever has grown, and the portfolio ends up close to holding the winner alone.

Deeper look · optional mathematical depth

Why a rebalanced mixture can grow faster than its parts

Let rt,ir_{t,i} be the return of asset ii in month tt and wiw_i its weight, with wi≥0w_i\ge 0 and ∑iwi=1\sum_i w_i=1⁠. With rebalancing every month the portfolio’s return is w⊤rt=∑iwirt,iw^\top r_t=\sum_i w_i r_{t,i}⁠, and its value after TT months is

VT(w)=∏t=1T(1+w⊤rt).V_T(w)=\prod_{t=1}^{T}\left(1+w^\top r_t\right).

Its growth rate per month is the average of log⁡(1+w⊤rt)\log(1+w^\top r_t)⁠. For small returns, log⁡(1+x)≈x−12x2\log(1+x)\approx x-\tfrac12x^2⁠. Write μ\mu for the vector of average returns, Σ\Sigma for their covariance matrix, and M=Σ+μμ⊤M=\Sigma+\mu\mu^\top for the matrix of average products of returns (the average of x2x^2 is its variance plus its squared mean). Then

g(w)≈w⊤μ⏟average return−12 w⊤M w⏟cost of volatility.g(w)\approx \underbrace{w^\top\mu}_{\text{average return}}-\underbrace{\tfrac12\,w^\top M\,w}_{\text{cost of volatility}}.

For monthly returns the variance part of MM is much the larger: an industry with an average return of 1% a month and a standard deviation of 5% has σ2=0.0025\sigma^2=0.0025 and μ2=0.0001\mu^2=0.0001⁠.

Each asset alone grows at about μi−12Mii\mu_i-\tfrac12M_{ii}⁠. The rebalanced mixture beats the weighted average of its parts’ growth rates by

12(∑iwiMii−w⊤Mw)=12(∑iwiσi2−w⊤Σw)+12(∑iwiμi2−(w⊤μ)2) ≥0.\begin{aligned} &\tfrac12\Big(\sum_i w_iM_{ii}-w^\top Mw\Big)\\ &\quad=\tfrac12\Big(\sum_i w_i\sigma_i^2-w^\top\Sigma w\Big)\\ &\qquad+\tfrac12\Big(\sum_i w_i\mu_i^2-(w^\top\mu)^2\Big)\ \ge 0. \end{aligned}

Both parts are non-negative. The first is positive whenever the assets are not perfectly correlated, the second whenever their average returns differ, and for monthly returns the first is usually far larger. Booth and Fama (1992) call the gain the diversification return; it is the same volatility drag as in the 3× leverage article, working in our favour. It does not need the market to rise: it comes from the mixture, not from the trend.

The data: ten industries and their 3× versions

The ten industry portfolios of the French Data Library divide every US stock listed on the NYSE, AMEX and NASDAQ into consumer staples, consumer durables, manufacturing, energy, technology (business equipment), telecom, retail, health, utilities and “other”, and weight the stocks in each by market value. The daily returns start in July 1926 and include dividends. Because the portfolios are rebuilt from all listed stocks every year, they include companies that later disappeared, so they are free of the survivorship bias that a list of today’s funds would have.

My original search was on leveraged ETFs, funds that deliver a multiple of an index’s daily return. Real leveraged funds started only in 2006 and have never seen a crash like 1929 or 2000–2002. To keep the leverage and gain a century of history, I built a 3× version of each industry from its real daily returns, the way such a fund works: each day it earns three times the industry’s return, pays interest on the borrowed two thirds at the risk-free rate, and pays a management fee of 0.95% a year, the typical fee of 3× funds. The position is reset every day (daily rebalancing). These are constructed series, not funds anyone could buy in 1930.

How close is the construction to a real fund? Built the same way from five years of daily QQQ closes (October 2021 to September 2026, from the 3× article’s data), the construction moved almost exactly like the real TQQQ (correlation of daily returns 0.9996) but grew 21.6% a year where TQQQ grew 20.4%. Real funds borrow through swaps that cost more than the risk-free rate, so the 3× results in this article are about 1–2 percentage points a year too optimistic. Charging an extra 1.5% a year lowers every 3× strategy below by about the same amount and changes none of the comparisons.

A hill we cannot see

With three industries the hill becomes a surface. Every mixture of three weights that add up to 1 is a point in a triangle: each corner is 100% in one industry, and the middle is a third in each. Figure 2 colours every point by the growth that mixture achieved from 1927 to 2026.

Figure 2. Every mixture of Health, Energy and Utilities is a point in the triangle; the colour is its growth per year from 1927 to 2026 with monthly rebalancing. The highest point is at 72% Health and 28% Energy (11.74% a year). Dark lines: three runs of my 2025 search, from three starting points, each step adding 1% to one or two weights, with a random step one time in ten. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios, monthly returns 1927–2026; no costs. Search code in the companion repository.

The function we are climbing is called the objective function: here, the growth of the portfolio as a function of its weights. The blindfold is real. With ten industries the triangle becomes a shape in nine dimensions, and the only way to learn the height at a point is to compute it, a full pass over a century of returns. A search has to decide where to step next from a few such measurements.

Question 1: which directions can a step take?

A step in a free space can go anywhere. Portfolio weights cannot: none may be negative (no short selling here), and together they must add up to 100%. A step that adds 1% to one weight must take 1% from the others.

My 2025 notebook answered this in the simplest way I could think of. From the current weights it tried every move that adds 1% to one weight, or to two weights at once, and then divides all the weights by their new total so that they again add up to 100%. It computes the objective for each candidate and moves to the best one. A step of this kind can never push a weight below zero, and it can only grow a weight directly, shrinking the others in proportion. The method is a form of hill climbing, a search that compares the neighbours of the current point instead of computing the slope. It needs one full evaluation per neighbour: 55 of them with ten assets.

Two standard alternatives use the slope itself, which for this objective has a simple formula:

  • Projected gradient ascent: take an ordinary step up the slope, then move to the nearest point that is a valid set of weights. The step may leave the triangle; the projection brings it back.
  • Exponentiated gradient: multiply each weight by a factor that is larger the more that asset would add to growth, then divide by the total. Weights stay positive automatically. Helmbold, Schapire, Singer and Warmuth (1998) proposed exactly this rule for portfolios that are rebalanced to fixed weights, building on Cover’s universal portfolio (1991), which studied the same kind of portfolio as the book’s strategy, a constant-rebalanced portfolio.

On this objective all three climb to the same peak, for the reason given under the next question. The multiplicative rule needs far fewer evaluations, which matters when the search is repeated every year for 89 years, as in the experiment below.

Deeper look · optional mathematical depth

The slope and the multiplicative step

Write the objective as the mean log growth g(w)=1T∑t=1Tlog⁡(1+w⊤rt)g(w)=\frac1T\sum_{t=1}^{T}\log\left(1+w^\top r_t\right)⁠. Its slope with respect to the weight of asset ii is

∂g∂wi=1T∑t=1Trt,i1+w⊤rt,\frac{\partial g}{\partial w_i}=\frac1T\sum_{t=1}^{T}\frac{r_{t,i}}{1+w^\top r_t},

the average return of asset ii⁠, weighted up in the months when the portfolio as a whole did badly. The exponentiated-gradient step with step size η\eta is

wi ← wi eη ∂g/∂wi∑jwj eη ∂g/∂wj.w_i\ \leftarrow\ \frac{w_i\,e^{\eta\,\partial g/\partial w_i}}{\sum_j w_j\,e^{\eta\,\partial g/\partial w_j}}.

Every factor eη ∂g/∂wie^{\eta\,\partial g/\partial w_i} is positive, so the weights stay positive, and the division keeps their total at 1. Taking logarithms of both sides, with ZZ the denominator,

log⁡wi ← log⁡wi+η ∂g∂wi−log⁡Z:\log w_i\ \leftarrow\ \log w_i+\eta\,\frac{\partial g}{\partial w_i}-\log Z:

an ordinary gradient step on the logarithm of each weight, followed by normalisation. The logarithm can fall as far as the step takes it, while the weight itself only approaches zero.

Question 2: can the climb get stuck on a lower peak?

A known weakness of hill climbing is that it stops at the first peak it reaches, even when a higher one stands nearby. To guard against this I added randomness: one step in ten moves to a random neighbour instead of the best one, which lets the climber walk down a little and perhaps find a better slope.

For the goal of maximizing end wealth there is good news: no lower peaks exist. The logarithm of end wealth is a sum of logarithms of the portfolio’s monthly growth factors. Each of these is a concave function of the weights, which means its graph bends downward everywhere, like a dome, and a sum of domes is still a dome. On a triangle a dome has one top (it can be a single point or a flat ridge), and every uphill path leads to it. That is why the curves in Figure 1 have one peak and why the colours in Figure 2 rise toward one point.

My notebook’s default goal was slightly different: the average of the wealth curve over the period, not its final value. For that goal there is no such guarantee, and I tested the search on four industries (Technology, Health, Energy and Utilities) with the notebook’s settings: rebalancing every 30 trading days, steps of 1%, 600 steps, eight random starting points, and two periods, 1995–2004 and 2010–2019. Without random steps, every start reached the same point for the end-wealth goal, for the average-wealth goal and for the sum of losses. With random steps the search kept wandering around the top and its best point was slightly lower: for end wealth in 2010–2019, between 4.15 and 4.22 times the starting money instead of 4.38. Randomness had a price and nothing to buy there.

The fourth goal of the notebook was different: minimize the number of losing periods. A count does not change when the weights move a little, so this objective is a staircase of flat steps. On a flat step there is no slope at all, and a staircase has many separate tops. Here the greedy search, without random steps, ended at very different weights depending on where it started, with between 22 and 30 losing periods out of 83 in 1995–2004. Random steps made the ends somewhat closer together but did not remove the problem (23 to 30).

So randomness is the right tool for the right goal. The standard form of the idea is simulated annealing (Kirkpatrick, Gelatt and Vecchi, 1983): accept downhill steps often at the start and less and less often as the search proceeds, and keep a record of the best point seen. Two simple habits help with any of these searches: restart from several random points and compare where they end, and return the best point visited rather than the last one.

Question 3: why maximizing end-of-period profit leads to weights that do not help

Finding the peak of the past is now a solved problem. The question that matters is what the peak of the past does in the future. To test it honestly, I repeated the search the way it would be used in practice. At the start of every year from 1937 to 2025, the weights were chosen using only the ten years before that date, held for one year with monthly rebalancing, and then chosen again. The years after each choice were never seen by the search. In the terms of research methodology, the choice is made in sample and judged out of sample, as in a walk-forward test.

Figure 3 shows which weights the search chose on the ten 3× industry funds.

Figure 3. Each bar is the portfolio the search chose at the start of a year, using only the ten years before it. On average the largest weight was 76%, and in 31% of the years more than 90% went to a single industry; without leverage the average largest weight was 90%. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios; 3× series built from their daily returns (3 × daily return − 2 × risk-free rate − 0.95% a year, reset daily). Exponentiated-gradient ascent on mean log growth; monthly rebalancing.

The search does what it was asked: it finds the industry that did best in the last decade and bets almost everything on it. Consumer staples lead through the late 1980s and 1990s, technology after 2019, energy in several decades. Figure 4 then compares, year by year, how well the chosen weights had done over the ten years used to choose them with what they did in the year that followed.

Figure 4. The weights that did best over the previous ten years did not do correspondingly well in the next year: the correlation between the two is 0.01 without leverage and 0.09 with 3× funds. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios and 3× series built from them. Weights from exponentiated-gradient ascent on mean log growth over the previous 120 months.

There is no visible relationship. With 3× funds, in the 23 years when the chosen weights had grown more than 50% a year over their decade, they lost money in the following year 11 times, and more than 40% five times; in the 41 years when they had grown less than 30% a year, they lost money 12 times, and more than 40% five times. The table below gives the totals over the 89 years. The column “on the years used to choose” is what the search saw; the columns after it are what an investor following it would have lived through.

Weights chosen byOn the years used to chooseIn the following yearsSharpe ratioWorst fall
Maximize end wealth, no leverage16.4% a year9.5% a year0.39−77%
Equal weights, no leverage11.3%11.3%0.57−48%
Maximize end wealth, 3× funds34.9%13.3%0.45−99%
Maximize average wealth (the notebook’s default), 3×30.5%11.0%0.41−99.8%
Equal weights, 3× funds20.3%20.1%0.57−93%

Growth rates are averages per year, compounded; the worst fall is the largest drop from a previous high. The whole US market grew 10.7% a year over the same years.

One more comparison explains most of the gap. Averaged over the 89 years, the return of the chosen weights in the year after each choice was 34.1% with 3× funds, almost exactly the 34.4% of equal weights, and 12.2% against 12.7% without leverage. The search did not find industries with a higher future return. It found the same average with much larger swings from year to year (a standard deviation of 67 percentage points against 58), and compounding turns swings into lost growth: the same volatility drag as in the deeper look above, now working against us. Concentration added risk and no return.

Three things went wrong at once, and they are worth separating.

  • The peak of the past is a peak of luck as well as of skill. Ten years of returns contain a real difference between industries and a large dose of chance. The search cannot tell them apart, and it is drawn to whichever industry had the most of both. The part that came from chance does not repeat. This is overfitting: the weights fit the particular decade, not the process that produced it.
  • The objective rewards concentration. End wealth on past data is highest when everything is in the past winner, and the dome of Figure 2 often has its top on an edge or a corner. A concentrated portfolio is fragile: when the winner’s luck turns, nothing else is there to soften the fall.
  • The peak moves. Even the true best weights change as industries rise and decline. Weights chosen on 1990–1999 were made for a world that ended in 2000.

The result is the one my reply to the comment predicted: the search returns what would have been best had we known the future. The column “on the years used to choose” in the table is that hindsight; the columns after it are the future.

Question 4: what should we maximize instead?

If the problem is that the average returns of the past are poor guides, a better objective should lean on them less. I compared five ways of choosing weights each year, on the same funds and the same years.

Figure 5. Out of sample, the portfolio that maximized past growth grew 13.3% a year and fell 99% at its worst, while equal weights in the same funds grew 20.1% a year and minimum variance 18.7%. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios and 3× series built from them. Monthly rebalancing, no trading costs; weights chosen at the start of each year from the previous 120 months.
Weights chosen byNo leverage: growth, Sharpe, worst fall3× funds: growth, Sharpe, worst fall
Equal weights (no optimization)11.3%, 0.57, −48%20.1%, 0.57, −93%
Minimize variance10.1%, 0.58, −37%18.7%, 0.56, −83%
Half maximize end wealth, half equal10.7%, 0.49, −58%18.1%, 0.53, −97%
Maximize Sharpe ratio9.2%, 0.43, −52%11.9%, 0.41, −97%
Maximize end wealth9.5%, 0.39, −77%13.3%, 0.45, −99%

The order is almost the reverse of how much each rule relies on past average returns.

  • Equal weights use no estimate at all, and they came first. DeMiguel, Garlappi and Uppal (2009) found the same across many data sets: with realistic amounts of data, the estimation error of optimized portfolios costs more than optimization gains.
  • The minimum-variance portfolio uses the industries’ volatilities and correlations but ignores their average returns. Risks are much easier to estimate than average returns (Merton, 1980), and this rule had the best Sharpe ratio without leverage and the smallest falls in both cases.
  • Maximizing the Sharpe ratio, return per unit of risk, sounds more careful than maximizing growth, but it still trusts past averages, and it did no better than maximizing end wealth: 9.2% a year without leverage and 11.9% with 3× funds. Michaud (1989) called optimizers “estimation-error maximizers” for this reason: they put the most weight exactly where the estimates are most flattering.
  • Pulling the optimized weights halfway back to equal weights, a simple form of shrinkage, recovered most of the gap. Shrinking estimates toward a plain target is the standard cure for noisy estimates (Ledoit and Wolf, 2004).

So my answer to the post’s fourth question: maximize something that depends less on the noisiest numbers. Prefer risk to return, prefer a shrunken answer to a sharp one, and keep equal weights as the benchmark that any optimizer must beat out of sample, not in sample.

The 3× column has a second lesson. Equal weights in 3× funds grew fastest of all, 20.1% a year, but fell 89% in 1937–1942, 80% in 2000–2002 and 93% in 2007–2009. No investor holds a strategy through a 93% fall without questioning it. Whether a strategy that works also survives is the subject of the previous article.

How often to rebalance, and what it costs

The book’s rule says to rebalance “from time to time”. Figure 6 compares rules for an equal-weight portfolio of the ten industries, with and without leverage, and with a trading cost of 0.5% of every amount bought or sold.

Figure 6. Every rebalancing rule beat never rebalancing, but more trading was not better: with 3× funds, yearly rebalancing grew 19.1% a year, monthly 17.2% and daily 16.4%. Trading costs widen the gap. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios and 3× series built from them. Daily simulation; costs charged on the value traded at each rebalance.

Two results stand out. First, rebalancing beat leaving the portfolio alone in every version. Figure 7 follows the gap over time: with 3× funds, a portfolio rebalanced every month ended the century with 3.75 times the money of the same portfolio never rebalanced, and without leverage 1.35 times. The gain was far from steady; with 3× funds the rebalanced portfolio was behind for years at a time, whenever a few industries kept winning.

Figure 7. Starting from equal weights in the ten industries in 1927, the portfolio rebalanced every month ended with 1.35 times the value of the one never rebalanced; with 3× funds, 3.75 times. With 3× funds the ratio fell below 1 for long stretches, when a few industries kept winning. Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios and 3× series built from them. Daily simulation; rebalancing at month ends, no costs.

Second, less often was better, even with no costs at all: yearly beat quarterly, quarterly beat monthly, and daily was worst. A plausible reason is that industry returns tend to continue for some months before they reverse (Moskowitz and Grinblatt, 1999, on industry momentum): rebalancing every month sells a winner while it is still winning, and rebalancing once a year waits until more of its run is over. That is a description of this century of data, not a law; the best frequency is itself a parameter that can be overfitted.

With costs the picture tilts further. Daily rebalancing of the 3× funds trades 3.4 times the portfolio’s value a year (its turnover), and at 0.5% per trade it lost 2.0 percentage points of growth a year; yearly rebalancing traded 0.27 times the portfolio’s value and lost less than 0.2 points. A rule that rebalances only when a weight has drifted 25% away from its target trades rarely and sits between them.

What about sudden events?

The reader who commented on the post was worried about sudden events: a sharp fall after which an algorithm sells instead of waiting for the recovery. Rebalancing does the opposite, it buys what fell. But it acts only at its next scheduled date, and it cannot undo the fall itself. Figure 8 shows two crashes.

Figure 8. A sudden crash hits a rebalanced portfolio as hard as any other: on 19 October 1987 the equal-weight 3× portfolio lost about half its value in one day, with or without monthly rebalancing. Rebalancing acts only afterwards, by buying what fell; in 2020 that helped less than holding the winners (1.24 against 1.62 by the end of the year). Source: Kenneth R. French Data Library, 10 value-weighted US industry portfolios and 3× series built from them. Daily simulation, rebalancing at month ends, no costs.

On 19 October 1987 the equal-weight industry portfolio fell 17.4% and its 3× version 52.3%, the same with and without rebalancing, because both held the same funds that morning. In 2020 rebalancing bought the industries that fell in March, which recovered, but it also kept selling technology through the rest of the year while technology kept rising, and the portfolio that was never rebalanced ended the year 30% ahead. Inside each 3× fund the daily reset works the other way round: after a fall the fund sells to bring its leverage back to 3×, which is the mechanism of volatility drag described in the 3× article. A portfolio of leveraged funds rebalanced monthly therefore sells after falls every day and buys after falls every month.

The reader’s point stands: no rule fixed in advance knows whether a sharp move will reverse. Rebalancing is a bet that, over many such moves, reversals will win; it is not protection against any one of them.

Research and application: which came first?

The search in the post was a research idea: a mathematical method applied to a clean question. Applying it to real funds changed the questions. The method worked, and it found the top of the hill every time. The application showed that the top of the hill was the wrong target, that the right objective is a research question in itself, and that the answer had to be checked on years the search had not seen. Each of those steps sent me back to research: to the shape of the objective, to estimation error, to rebalancing frequency.

That is the loop the post’s opening asked about. Research that is never applied does not meet the problems that matter, and application that is never studied repeats the problems without understanding them. The chicken and the egg are less a puzzle than a cycle, and the useful work happens in going round it.

What this does and does not show

  • Industries are not funds. The industry portfolios are indexes with no fees or trading costs, and the 3× versions are constructions that were about 1–2 points a year more optimistic than a real 3× fund over the five years where both exist.
  • One century, one country. The US had an unusually successful century, and its industries’ history is one sample. The direction of the results agrees with studies on many data sets (DeMiguel, Garlappi and Uppal, 2009), but the exact numbers belong to this history.
  • The test has its own choices. Ten years to choose, one year to hold, monthly rebalancing: other choices give other numbers. I fixed them before looking at the out-of-sample results and did not search over them, which would itself be overfitting.
  • No taxes. Rebalancing in a taxable account realizes gains, which favours rebalancing less often.
  • None of this is investment advice. The article does not recommend a portfolio, a fund or a level of leverage. It shows what a search over past data can and cannot tell us.

Practical takeaway

  1. A search on past data answers a question about the past. Its result is the best portfolio had we known the future. Treat it as a description, not a forecast.
  2. Check every chosen rule on years it did not see. Choose on one period, judge on the next, and repeat; the gap between the two is the measure of overfitting.
  3. Make equal weights the benchmark. An optimizer that does not beat 1/N out of sample has not earned its complexity.
  4. Prefer objectives that rely on what can be estimated. Risks and correlations are estimated far better than average returns.
  5. Use randomness where the objective has flat steps or many peaks, keep the best point visited, and restart from several points. Where the objective has a single peak, a plain uphill search is enough.
  6. Rebalance, but not too often, and count the costs and taxes of every trade.

Reproducibility

Every number and figure in this article comes from the companion repository dvirross/portfolio-weights-in-hindsight: a small Python package with the search from the 2025 notebook (the same neighbours, objectives and random steps), the exponentiated-gradient and projected-gradient optimizers, the 3× construction and a daily rebalancing simulator with costs; a script that downloads the daily files from the Kenneth R. French Data Library and records their checksums; the analysis script that produces every table in about a minute; the figure code; and unit tests. The raw data files are downloaded by the script rather than stored in the repository.

Further reading

Rebalanced portfolios and how to search for their weights

  • Thomas M. Cover (1991), “Universal portfolios,” Mathematical Finance 1(1), 1–29 (DOI 10.1111/j.1467-9965.1991.tb00002.x). Portfolios rebalanced to fixed weights, and a rule that does almost as well as the best one chosen in hindsight.
  • David P. Helmbold, Robert E. Schapire, Yoram Singer and Manfred K. Warmuth (1998), “On-line portfolio selection using multiplicative updates,” Mathematical Finance 8(4), 325–347 (DOI 10.1111/1467-9965.00058). The exponentiated-gradient rule used in this article.
  • David G. Booth and Eugene F. Fama (1992), “Diversification returns and asset contributions,” Financial Analysts Journal 48(3), 26–32 (DOI 10.2469/faj.v48.n3.26). Why a rebalanced mixture can grow faster than its parts.
  • Scott Kirkpatrick, C. Daniel Gelatt and Mario P. Vecchi (1983), “Optimization by simulated annealing,” Science 220(4598), 671–680 (DOI 10.1126/science.220.4598.671). Randomness as a systematic way out of lower peaks.

Estimation error and what to optimize

  • Robert C. Merton (1980), “On estimating the expected return on the market,” Journal of Financial Economics 8(4), 323–361 (DOI 10.1016/0304-405X(80)90007-0). Why average returns are so much harder to estimate than risks.
  • Richard O. Michaud (1989), “The Markowitz optimization enigma: Is ‘optimized’ optimal?,” Financial Analysts Journal 45(1), 31–42 (DOI 10.2469/faj.v45.n1.31). Optimizers as estimation-error maximizers.
  • Victor DeMiguel, Lorenzo Garlappi and Raman Uppal (2009), “Optimal versus naive diversification: How inefficient is the 1/N portfolio strategy?,” The Review of Financial Studies 22(5), 1915–1953 (DOI 10.1093/rfs/hhm075). Equal weights against fourteen optimized rules, out of sample.
  • Olivier Ledoit and Michael Wolf (2004), “Honey, I shrunk the sample covariance matrix,” The Journal of Portfolio Management 30(4), 110–119 (DOI 10.3905/jpm.2004.110). Shrinkage in practice.
  • David H. Bailey, Jonathan M. Borwein, Marcos López de Prado and Qiji Jim Zhu (2014), “Pseudo-mathematics and financial charlatanism: The effects of backtest overfitting on out-of-sample performance,” Notices of the American Mathematical Society 61(5), 458–471 (DOI 10.1090/noti1105). How easily a search over past data produces results that do not repeat.

Industries and rebalancing frequency

  • Tobias J. Moskowitz and Mark Grinblatt (1999), “Do industries explain momentum?,” The Journal of Finance 54(4), 1249–1290 (DOI 10.1111/0022-1082.00146). Why industry returns tend to continue for a while.

The book

Data

  • Kenneth R. French, Data Library: the 10 industry portfolios and the risk-free rate, daily from 1926.

Provenance

This article expands a LinkedIn post: