A portfolio manager that explains itself, and what optimization is worth
A portfolio construction and risk engine that turns research signals into positions, explains every weight, stress-tests and backtests the result, with a pre-registered test of fourteen methods on 55 years of public data and a live demo that runs the engine in your browser.
- Optimizers beating equal weights after costs
- 0 of 13 (Holm-corrected)
- Minimum variance vs equal weights
- Same Sharpe at 7.7% vs 13.1% volatility
- Cost of errors in means vs covariance
- 0.066 vs 0.011 of Sharpe
- Learned signal weights vs equal weights
- Won only by catching a wrong sign
- Python
- NumPy
- pandas
- SciPy
- JavaScript

A portfolio manager has to turn many imperfect signals into one set of positions without letting any one input, or the optimizer itself, take over. I built the engine that does that: it reads signals from independent research systems through one point-in-time interface, builds portfolios with fourteen construction methods under realistic constraints, explains why each position is the size it is, measures the risk, stress-tests it and backtests it walk-forward with trading costs. Then I asked the question every optimizer has to answer: does it beat simply holding everything in equal weights?
The demo below runs the same engine in your browser on monthly data for 12 US industries and two Treasury maturities since 1962, or on nine factor “strategy sleeves”. Pick a method, change the inputs or the constraints, and read the explanation under the weights.
What the demo does #
- Construct. Thirteen methods, from equal weights to mean-variance, maximum Sharpe, risk parity, equal risk contribution, hierarchical risk parity, Black-Litterman, Kelly and a market-neutral book, under position, sector, gross-exposure and volatility limits. You can edit any asset’s expected return or volatility, or add an asset of your own.
- Why each position. For optimizer-based methods every weight is decomposed exactly: the asset’s expected return, what the binding constraints cost (their shadow prices act like changes to expected returns), the part of the return the other assets already deliver, and the risk they cannot hedge away.
- Signals. Research signals arrive with their family, horizon, provenance, model version and a track record measured month by month. You can switch them on and off, combine them five ways, add your own, and use the result as expected returns.
- Risk and stress tests. Value at risk five ways, factor exposures, backfilled drawdowns, liquidity at different fund sizes, correlations in calm and turbulent markets, and nine scenarios (2008, 2020, 2022, the 1987 crash, the dot-com bust, an AI-capex reversal, a volatility spike, a bond sell-off, a credit crisis) that you can edit or extend.
- Estimation error lab. It treats the current inputs as the truth, simulates histories from them, re-estimates and re-optimizes, and shows how much less the portfolios deliver than they promise.
- Backtests. Walk-forward backtests with costs since 1972, recomputed in the browser, next to the pre-registered results.
What I found #
I fixed the hypotheses, methods and tests in writing before running anything. The main test pits thirteen methods against equal weights on the industries-and-Treasuries universe from 1972 to 2026, rebalancing monthly with a ten-year estimation window and trading costs of 10 basis points (2 for Treasuries).
| Question | Result |
|---|---|
| Does any optimizer beat equal weights? | No. The best (Black-Litterman with momentum views) leads by 0.06 of Sharpe, interval −0.03 to +0.15; maximum Sharpe on historical means trails by 0.13. Nothing is significant after correcting for thirteen tests |
| Do risk-based methods help? | They deliver the same Sharpe with far less risk: minimum variance runs at 7.7% volatility with an 18% worst drawdown, against 13.1% and 43% |
| Where does optimization go wrong? | In the expected returns. With known parameters, errors in the means cost 0.066 of Sharpe and errors in the covariance 0.011; optimizers promised a Sharpe of 0.79 and delivered 0.51 |
| Does learning how to weight signals beat equal weights? | Yes, against my pre-registered expectation, but only because one signal (industry-level short-term reversal) had a reliably wrong sign. Fixing that sign by hand made equal weights as good as learning |
| Does Kelly sizing pay? | It grew wealth fastest and fell 78-86% from peak |

Optimization did not create alpha. Where a method did better, the improvement came from better inputs, such as Black-Litterman’s anchoring to market weights or a correctly signed signal, or from simply taking less risk. Shrinking the inputs and capping positions made optimizers less harmful rather than better. Risk models had their own lessons: on daily data every unconditional value-at-risk model breached too often or in clusters, and stock-bond correlations, which turned negative in the 2000s and 2010s, are positive again in the 2020s.
How it works #
- A solver I can explain. Portfolios come from a quadratic-program solver I wrote (the ADMM algorithm behind OSQP, with an exact final step). It matches the Clarabel interior-point solver to eight decimal places, and the browser runs a line-by-line port of it, checked against the Python version on 54 test cases.
- Point-in-time signals. Every research system hands over the same record. The engine only ever reads signals known at the decision date, and tests rewrite the future to prove that no past decision changes.
- Realistic backtests. Trades are charged spread, commissions and square-root market impact, cash earns the T-bill rate and shorts pay a borrow fee. Execution goes through a two-message interface, and the same orders can be routed through my smart order router, a separate project, for a simulated multi-venue execution.
- Statistics. Paired bootstrap and Jobson-Korkie tests on Sharpe differences, Holm corrections across methods, and a synthetic laboratory where the true signal quality is known.
Limits #
- Industry portfolios are not instruments; sector funds and futures only cover recent decades, so the cost assumptions are assumptions.
- One fourteen-asset universe carries the main result; with hundreds of assets or genuinely strong signals the trade-off between estimation error and opportunity changes.
- The built-in signals are simple public ones. The engine is designed to take signals from my other research systems, but those use licensed or private data and are not part of the public study.
- Sharpe differences of a few hundredths cannot be detected even in 55 years of monthly data, so several results are absences of evidence rather than proof of equality.
How it’s built #
A Python package (NumPy, pandas, SciPy) with 109 tests, a script that rebuilds every experiment from public data (Ken French’s industry and factor returns and Federal Reserve Treasury yields), and a static browser demo in plain JavaScript with its own SVG charts and no external requests. Data: Kenneth R. French Data Library and FRED.