Use mean–variance portfolio theory to construct an efficient frontier, choose a portfolio and see how it behaved on returns excluded from the estimation window.
5 industriesUS equity research portfolios
2015–202296 estimation months
2023–202536 holdout months
Mean–Variance Portfolio Lab
How should capital be allocated when investments have different expected returns, risks and correlations? This project applies Markowitz’s framework to real monthly value-weighted returns from Kenneth French’s five US industry portfolios. It estimates the efficient frontier and selects a maximum-Sharpe allocation under explicit constraints.
“Optimal” has a precise meaning here: the highest estimated excess return per unit of volatility within this investment universe and these constraints. It is conditional on historical estimates, not a claim about the best future investment. All results are in USD. The inputs are research portfolios, not ETF prices or directly purchasable products.
Explore the frontier
Change the objective, sector cap or cash-rate assumption. These choices use only the 2015–2022 estimation sample. Transaction costs affect the later performance comparison, not the estimated frontier or selected weights.
Hollow labelled points are individual industries; a 100% single-industry allocation exceeds the 40% and 60% caps. Hover over marks for values. Exact figures are available in the tables and downloads.
What happened after selection?
January 2023–December 2025 · fixed target weights, rebalanced monthly
Selected · solid
Minimum variance · dashed
Equal weight · dotted
Starts at $1 before initial trading costs. Includes the chosen cost assumption. The holdout is a historical illustration, not a live trading record.
Selected allocation
Illustrative deployment of $10,000, before fees (rounded amounts); asset return and volatility estimates use the training sample.
Industry portfolio
Weight
USD allocation
Est. return / year
Est. volatility / year
Holdout comparison
36 months, January 2023–December 2025. Returns include the selected illustrative transaction cost; taxes and fund fees are excluded.
Portfolio
CAGR
Volatility / year
Sharpe
Max. drawdown
Final $1
The theory behind the result
For portfolio weights \(w\), estimated annual arithmetic returns \(\mu\) and annual covariance matrix \(\Sigma\):
For each feasible target return \(r\), minimise \(w^\top\Sigma w\) subject to \(w^\top\mu=r\), \(\sum_i w_i=1\) and \(0\leq w_i\leq c\), where \(c\) is the chosen industry cap. The efficient frontier is the branch above the return of the global minimum-variance portfolio: no feasible portfolio on that branch offers the same return with lower variance.
The cash rate \(r_f\) is a comparison rate, not a sixth asset. The model stays fully invested in equities and permits neither borrowing nor short selling. The minimum-variance alternative chooses the smallest estimated volatility without requiring an investor’s return forecast.
The estimates use \(\mu=12\bar r\) and \(\Sigma=12S\), with \(S\) the sample monthly covariance matrix using denominator \(n-1\). These are annualised arithmetic estimates; they are not CAGR. Square-root-of-time scaling assumes the monthly covariance is representative and ignores serial dependence.
The default research result
At the 60% industry cap and training-period cash rate of 0.8475% per year, the maximum-Sharpe solution allocates 60% to high technology and 40% to health, with zero weights in the other three industries. Its estimated annual arithmetic return is 12.34%, volatility 16.07%, and Sharpe ratio 0.72. These figures describe the default configuration; the interactive tables reflect any settings you change.
With the default 10-basis-point trading-cost assumption, its separate 2023–2025 holdout CAGR is 25.89%, compared with 19.15% for equal weighting. This favourable historical outcome does not establish future superiority. Zero weights are boundary solutions of this model, not a claim that those industries should be avoided. Tightening the cap to 40% requires at least three industries and provides a useful concentration sensitivity.
A check beyond the fitted sample
Weights are estimated once using January 2015–December 2022. The same target weights are then restored at each month-end during January 2023–December 2025; there is no refitting on the holdout. The chart compounds the actual monthly weighted returns. Holdout CAGR is the compounded annual growth rate; volatility is the sample monthly return standard deviation times \(\sqrt{12}\). Holdout Sharpe uses the actual monthly Treasury-bill returns and the standard deviation of realised monthly excess returns.
At the default cost of 10 basis points, one full dollar of one-way turnover costs $0.001. The initial cash deployment is charged once. Subsequent month-end turnover is half the sum of absolute differences between drifted and target weights; it is charged after that month’s return. The final month has no rebalance or liquidation charge. These are illustrative execution costs, not measured costs for the research portfolios. Drawdown uses month-end wealth, including the initial $1; it can understate intramonth losses.
How this can be used in practice
1. Set an investable mandate
For a sector allocation review, replace the research baskets with available funds or a security universe. Use total returns, align currency and dates, and include the mandate's cash needs, concentration limits and permitted exposures.
2. Turn the frontier into a decision
Use the curve to compare how much estimated return a higher risk budget buys. Maximum Sharpe suits a risk-adjusted-return objective; minimum variance can be more useful when return estimates are unreliable. An investor's loss tolerance and liabilities can require another point entirely.
3. Convert targets into trades
The $10,000 allocation table illustrates target amounts. With investable instruments, subtract current holdings, allow for lot sizes and liquidity, then assess fees, taxes, spreads and tracking differences before approving trades.
4. Monitor and challenge the model
Review weight drift, realised risk and concentration. Compare with equal weighting after costs, test alternative estimation windows and stress correlations. A calendar or tolerance-band rebalance policy can reduce unnecessary turnover.
For an investment committee, the useful deliverable is a comparison of feasible allocations and their sensitivities, together with an implementation plan. A mathematically optimal point is a decision input, not an automatic trade instruction. This demonstration does not execute transactions.
Data, reproducibility and limitations
The Kenneth French Data Library provides the five value-weighted industry return series. Its portfolio construction notes describe the annual industry assignments. The RF column in the Fama–French factors supplies the one-month Treasury-bill comparison return. Source percentages are divided by 100; these are total returns, not price-only changes.
The saved sample has 132 contiguous months, five industry series and an aligned RF observation for every month, with no missing-value sentinels or imputed observations. Dates after December 2025 are deliberately excluded to keep a complete-year historical holdout. The source ZIPs and processed-data hashes are recorded in the manifest. French’s historical data may be revised; this is a revised-history demonstration rather than a point-in-time backtest.
These five portfolios cover US equities only. They are not a diversified multi-asset opportunity set, and their industry definitions differ from commercial sector funds. A South African investor would additionally need ZAR returns, exchange-rate risk and appropriate local implementation constraints. The selection is educational and is not a personalised investment recommendation.
Expected returns are noisy, correlations can rise during stress, and mean–variance analysis does not describe all tail risks. Constraints reduce concentration but do not remove estimation risk. The comparison excludes fund fees, tax, market impact and changing investment universes beyond those already reflected in the research return series. Choosing settings after viewing the holdout also turns it into a validation sample; a fresh unseen period would then be needed for a further test.
The source bundle contains the pinned official downloads, parser, optimisation engine and independent numerical reference. From its root:
node--test tests/portfolio.test.mjs# To regenerate the data and independent reference (Python, NumPy and SciPy):python projects/efficient-frontier/build_data.py
The browser enumerates the possible active constraint sets for the five-asset quadratic programme. The plotted frontier uses 61 targets; maximum Sharpe is refined between targets rather than selected from that plotting grid. Tests compare frontier variances and selected weights against independently solved SciPy SLSQP problems. The source includes the data and calculation checks for review.