LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.

Mean-variance optimization picks weights to maximize a risk-adjusted expected return, the Sharpe ratio, using means, variances, and covariances. On three toy games whose payout laws never change, it works. The best single game had a Sharpe ratio of 1.83. The optimized mix reached about 1.92, and its average wealth path stayed above random mixes. On stocks, the means and the covariances move. Weights fit to one history are a fit to noise, and they do not win the next history. The lecture's conclusion is not that the math is empty. It is that the math needs inputs the market does not hold still.

Why it matters

The intention is easy to want. Estimate how much return you expect per unit of volatility, then tilt toward the mix with the best tilt, using the fact that assets do not move independently. The failure mode is also easy to miss in a textbook, because the textbook freezes the estimates. Apple in 2005 is not Apple now. A weight vector from 2005 is answering a different company and a different covariance. The lecture's second failure is deeper. Even a clever trading rule is, at the end, an estimate of expected return against some risk. If that expected return is a moving target, the optimized weights are a snapshot of a target that has already left.

The idea in plain words

The toys are three games tied to a common random event, so their payouts correlate. A die and a coin with no shared event would not. The games are labeled like stocks only so the later jump is obvious. Simulated means, variances, and a sample covariance with nonzero off-diagonal entries describe them. Because each game has a fixed mass function, those moments also have formulas. The Sharpe ratio of a game is its expected payout divided by the volatility of that payout. The lecture reports 0.54, 0.18, and 1.83. Game three is the best alone. Putting all the weight there is still not optimal, because the correlation structure rewards a blend. The tangency portfolio, the mix with the highest Sharpe ratio, keeps a large weight on game three and smaller weights on the other two, and its Sharpe ratio is about 1.92. Random weight vectors produce wealth paths. The optimized path's average stays above the others when the simulation is repeated. The goal was never the single luckiest path. It was the mix whose average path is best. That result uses time-invariant games. The expected payout, the variance, and the covariance are the same in 2005 and in 2050. Nothing has to be reestimated. Stocks are the opposite.

How to use it

Use the game result as a unit test for code. If your solver cannot raise 1.83 to about 1.92 on a frozen correlation structure, the solver is wrong before any stock data is loaded. On stocks, split history the way a machine-learning test is split. Fit weights on one window. Look at the next window before you change anything. Editing the weights until both windows look good is the lecture's description of fitting the test set. It calls that unscientific. A balanced reading, the one the lecture prefers to either extreme, is that careful estimates of means and covariances can be good enough over a short horizon and a bad joke over a long one. How fast the estimates move is part of the research, not a constant. Qualitative overlays, such as "this stock rose 20 percent last year so it cannot rise that much again," mix a story about cash flows with a story about sentiment. The lecture says that mix gets murky quickly and does not resolve it.

What usually goes wrong

Reporting the in-sample Sharpe ratio as the thing the portfolio will earn. In the game world, repetition really does favor the optimized path. In the stock world, the next sample has its own optimum, and the lecture's picture shows the old weights underneath it. A second mistake is maximizing terminal wealth in one simulated path. That path is random. The objective the lecture wrote down is the risk-adjusted expectation. A third is declaring the whole method useless because one out-of-sample window failed, or declaring it solved because the games worked. The lecture keeps both lenses. Frozen inputs, real improvement. Historic stock inputs, a fit that does not travel.

Questions people ask

What were the three game Sharpe ratios?

0.54, 0.18, and 1.83. The optimized combination was about 1.92, above the best game on its own, because the games are correlated.

What happened when the stock sample was refreshed?

The weights that were optimal on the first sample underperformed the weights that were optimal on the new sample. The lecture reads that gap as overfitting a changed covariance and changed means.

Does the lecture ban optimization?

No. It says the statistical picture is reasonable when the inputs are stable, and that stability is the assumption stocks violate. A practical estimate can still be useful on a horizon where the inputs do not move much. The lecture does not name that horizon.