I keep meeting people who run a portfolio optimizer, get a set of weights back, and treat the output like it came down from a mountain. The math is real and the theory holds up, but the thing has a personality, and once you understand what it is actually chasing you stop being surprised by its weird answers. So here is the whole idea without a single matrix.
The three things you feed it
A mean-variance optimizer eats exactly three kinds of information, and everything else is bookkeeping.
- Expected returns. Your guess at how much each asset earns per year, on average, going forward. Not last year's return, your forecast for the future. This is the input you are least sure about and the one the optimizer leans on the hardest.
- Volatilities. How much each asset bounces around on its own. A wide, jumpy asset has high volatility. A sleepy one has low volatility. This is your rough measure of how risky each holding is in isolation.
- Correlations. How the assets move relative to each other. Do they tend to rise and fall together, drift independently, or lean in opposite directions? This is the part people underrate, and it is where most of the magic actually lives.
Volatilities and correlations get bundled together into one object called the covariance, but you can hold them in your head as two separate ideas. How much each thing wobbles, and how the wobbles line up.
The single thing it maximizes
Here is the part that clears up a lot of confusion. The optimizer is not trying to make you the most money. It is not trying to give you the smoothest ride either. For a given risk budget, it maximizes expected return. That is the whole job. You hand it a level of risk you are willing to carry, and it finds the mix of assets that squeezes the highest expected return out of that exact amount of risk.
Flip it around and it works the same way. Pick a target return, and it hunts for the mix that hits that return with the least risk possible. Same machine, same logic, you are just holding one side fixed and letting it solve for the other.
The reason this feels non-obvious is that it is doing two things at once. It wants high expected return, and it wants low total portfolio risk, and those two goals pull against each other. The output is the best trade it can strike between them at the risk level you named. Nothing more mystical than that.
Why it falls in love with negative correlation
Total portfolio risk is not the average of the individual risks. This is the single most useful thing to internalize. When two assets move in opposite directions, one tends to be up on the days the other is down. Put them together and the down days get partially filled in by the up days, so the combined line is calmer than either asset on its own.
The optimizer can see this, and it is relentless about exploiting it. Give it two assets with the same expected return where one zigs when the other zags, and it will happily hold both, because the pair delivers that return at a lower combined risk than either could alone. From the machine's point of view, negatively correlated assets are almost free risk reduction. It gets to keep the return and shed the wobble.
This is also why an asset with a mediocre expected return can still earn a real place in the portfolio. If it moves against everything else you own, it is doing defensive work that a higher-returning but more correlated asset cannot. The optimizer does not care that the asset looks boring in isolation. It cares what the asset does to the whole.
How one bad estimate warps everything
Now the uncomfortable part. The optimizer treats all three inputs as if they were true. It has no sense of how confident you are in any of them, and it leans hardest on the one you should trust least, which is expected returns.
Say you nudge your return forecast for one asset up by a couple of percentage points, well within the range of a normal estimation error. The optimizer sees a holding that now delivers more return per unit of risk than its neighbors, and it responds by piling in. Sometimes it wants to put an absurd fraction of the portfolio into that one name, and it may fund the bet by going short something else it now considers relatively unattractive. One quiet tweak to a number you were guessing at, and the entire set of weights lurches.
This is the classic failure mode, and it has a name people throw around: the optimizer is an error maximizer. It seeks out the assets where your inputs are most optimistic, and those are disproportionately the assets where you were most wrong. The estimation error does not average out across the portfolio. It concentrates exactly where it does the most damage.
A few habits that keep this in check:
- Stress the return inputs, not just the weights. Before trusting an output, re-run it with each expected return shifted up and down by a plausible error. If the weights swing wildly, the portfolio is resting on a guess, not a signal.
- Cap the position sizes. Adding simple constraints, no single asset above some sensible ceiling, no short positions if you do not want them, throws out most of the insane corner solutions for almost no cost in theoretical return.
- Trust the covariance more than the returns. Volatilities and correlations are estimated from a lot of data and move slowly. Expected returns are close to a shrug. Weight your confidence accordingly, and consider anchoring returns toward a neutral baseline rather than feeding in raw forecasts.
None of this means the tool is broken. Used with a little suspicion it is genuinely useful, and the covariance side of it quietly does good work even when your return forecasts are mush. When I am sizing a book of signals inside Blockcircle, I lean on the correlation structure to keep positions from secretly being the same bet, and I keep the return estimates on a short leash. The optimizer is a sharp instrument. It just does exactly what you tell it, including the parts you did not mean to say.