Portfolio optimisation: choosing the weights

On this page
  1. The question
  2. The two formulas you need
  3. 50,000 random portfolios
  4. What “optimal” means
  5. The capital market line
  6. An optimiser instead of random draws
  7. Why real optimisers disappoint
  8. The code
  9. Summary
  10. References

Portfolio optimisation is how you decide how much money to put in each asset. Drawing thousands of random portfolios shows the shape of the problem and makes the intuition easier to see than an optimiser would.

This post pulls together the ideas before it in the Quantitative Finance Series 1: it needs expected returns, standard deviations, correlations and the Sharpe ratio.

The question

You have money to split across five tickers. Each has an expected yearly return, a standard deviation, and correlations with the others. What mix should you hold?

The inputs are the 2020 to 2025 figures from the earlier posts, annualised, with a 2% risk-free rate (Table 1):

Table 1. Expected return, standard deviation and Sharpe by ticker, 2020 to 2025
TickerExpected returnStandard deviationSharpe
SPY16.4%20.9%0.69
NVDA74.9%53.6%1.36
GS28.7%33.0%0.81
XOM18.3%33.1%0.49
GLD17.5%16.3%0.95

The stocks move together (correlations 0.2 to 0.8, from the correlation post). Gold is nearly unrelated to the rest (0.13 or less). Keep one thing in mind throughout: “expected return” here means “what happened in those years”, which is the standard shortcut and, as the end of the post shows, the weak point.

The two formulas you need

For weights w\key{w} (one per asset, adding up to 1), expected returns μ\good{\mu} and covariance matrix Σ\risk{\Sigma}. Hilpisch’s Python for Finance (chapter 13, equations 13-1 and 13-2) writes these as μp=∑iwiμi\good{\mu_p} = \sum_i \key{w_i} \good{\mu_i} and σp2=∑i∑jwiwjσij\risk{\sigma_p^2} = \sum_i \sum_j \key{w_i} \key{w_j} \risk{\sigma_{ij}}, where σij\risk{\sigma_{ij}} is the covariance of assets ii and jj; in vector form:

the weights we choosereturnsrisk

expected return: μp=w⊤μ\text{expected return: } \good{\mu_p} = \key{w^\top} \good{\mu} risk: σp=w⊤Σ w\text{risk: } \risk{\sigma_p} = \sqrt{\key{w^\top} \risk{\Sigma}\, \key{w}}

The return is just the weighted average of the assets’ returns. The risk is not a weighted average: as the correlation post showed, the correlations inside Σ\risk{\Sigma} decide how much of the risk cancels out. That asymmetry is the reason optimisation is worth doing at all.

50,000 random portfolios

I drew 50,000 random long-only mixes (all weights between 0 and 1, adding up to 1) and computed the return and risk of each (Figure 1):

{"panels":[{"x0":43.64,"x1":565.2,"y0":29.16,"y1":333.28,"title":"50,000 random mixes of five tickers, 2020\u20132025 (redder = higher Sharpe ratio)","xlabel":"Risk: standard deviation of yearly return (% a year)","ylabel":"Expected return (% a year)","xlog":false}],"series":[{"panel":0,"label":"capital market line (cash + best mix)","color":"var(--chart-maroon, #b6262c)","kind":"line","x":[0.0,57.5654],"y":[2.0,94.6606],"sx":[43.64,565.2],"sy":[325.66,-27.11]},{"panel":0,"label":"best Sharpe found","color":"#7d7b77","kind":"scatter","x":[20.3287],"y":[34.7223],"sx":[227.83],"sy":[201.09]},{"panel":0,"label":"lowest risk found","color":"var(--chart-blue, #3b6ea5)","kind":"scatter","x":[13.6335],"y":[17.1941],"sx":[167.17],"sy":[267.82]}]} 2026-10-31T01:55:46.923347 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0 10 20 30 40 50 Risk: standard deviation of yearly return (% a year) 0 10 20 30 40 50 60 70 Expected return (% a year) SPY NVDA GS XOM GLD 50,000 random mixes of five tickers, 2020–2025 (redder = higher Sharpe ratio) best Sharpe found lowest risk found capital market line (cash + best mix)
Figure 1. 50,000 random portfolios, the efficient frontier and the capital market line

Three things to notice:

  1. The cloud has a sharp upper-left edge. No mix gets above it. That edge is the efficient frontier: for each level of risk, the highest expected return available. Anything below the edge is beaten by a portfolio straight above it, with the same risk and more return.
  2. The lowest-risk mix (blue) has 13.6% risk, less than gold alone (16.3%). Adding some SPY to gold lowers risk, because they don’t move together.
  3. The best mix beats every single asset on Sharpe ratio. The best of the 50,000 has a Sharpe of 1.61\key{1.61} (Table 2), higher than NVDA alone (1.36), the best single asset.
Table 2. Best-Sharpe, lowest-risk and equal-weight mixes from the random draw
PortfolioReturnRiskSharpeMix
Best Sharpe found34.7%20.3%1.6160% GLD, 29% NVDA, 7% GS, 4% XOM, nothing in SPY
Lowest risk found17.2%13.6%1.1159% GLD, 36% SPY, 4% XOM, nothing in NVDA or GS
Equal weights31.2%22.6%1.2920% each

Notice what the best mix is: the stock with the best past return plus the asset that moves independently of it, with a little GS and XOM on the side. Nothing in SPY, even though SPY is “the market”: it’s just a worse version of NVDA in these years, and NVDA plus gold diversifies better.

(Random search only finds points near the true optimum. An optimiser such as SciPy’s minimize on the negative Sharpe ratio would find the exact edge. With 50,000 draws in five assets, we’re close.)

What “optimal” means

Romero and Balch state the problem like this: choose the weights with the least risk that still meets a target return r∗r^*, fully invested:

minimisewσp(w)subject torp(w)≥r∗∑iwi=1\begin{array}{ll} \underset{\key{w}}{\text{minimise}} \quad & \risk{\sigma_p}(\key{w}) \\[12pt] \text{subject to} \quad & \good{r_p}(\key{w}) \ge r^* \\[4pt] & \textstyle\sum_i \key{w_i} = 1 \end{array}

Solve it once for every possible target r∗r^*, and the answers trace out the efficient frontier: the lowest-risk portfolio for each achievable return. In practice you add limits too, such as no more than 40% in any one asset (with five assets, a cap must be at least 20% each, or the weights cannot add up to 1). Two special cases come up again and again:

Minimum variance: the mix with the least risk, whatever the return.

minimiseww⊤Σ wsubject to∑iwi=1\begin{array}{ll} \underset{\key{w}}{\text{minimise}} \quad & \key{w^\top} \risk{\Sigma}\, \key{w} \\[12pt] \text{subject to} \quad & \textstyle\sum_i \key{w_i} = 1 \end{array}

If short selling is allowed (weights can be negative), this has an exact answer:

wmin var=Σ−111⊤Σ−11\key{w_{\text{min var}}} = \frac{\risk{\Sigma^{-1}} \mathbf{1}}{\mathbf{1}^\top \risk{\Sigma^{-1}} \mathbf{1}}

where 1\mathbf{1} is a vector of ones. Note that it doesn’t use expected returns at all, which turns out to be an advantage (see below).

Maximum Sharpe ratio: the mix with the most excess return per unit of risk.

maximiseww⊤μ−rfw⊤Σ wsubject to∑iwi=1wi≥0\begin{array}{ll} \underset{\key{w}}{\text{maximise}} \quad & \displaystyle\frac{\key{w^\top} \good{\mu} - r_f}{\sqrt{\key{w^\top} \risk{\Sigma}\, \key{w}}} \\[12pt] \text{subject to} \quad & \textstyle\sum_i \key{w_i} = 1 \\[4pt] & \key{w_i} \ge 0 \end{array}

Without the long-only limit, the answer points in the direction Σ−1(μ−rf1)\risk{\Sigma^{-1}}(\good{\mu} - r_f \mathbf{1}), rescaled so the weights add up to 1. With limits like wi≥0\key{w_i} \ge 0 there’s no neat formula, and you need a numerical optimiser.

The capital market line

The dashed line in Figure 1 starts at the risk-free rate (2%, zero risk) and just touches the cloud at the best-Sharpe portfolio. Its slope is that Sharpe ratio:

E[R]=rf+Sharpebest×σ\good{E[R]} = r_f + \text{Sharpe}_{\text{best}} \times \risk{\sigma}

Every point on the line is a mix of the best-Sharpe portfolio and cash. Want less risk? Hold some cash. More? Borrow (if you can). The line lies above the frontier everywhere except where it touches, so in theory everyone should hold the same risky mix, and only change how much cash they hold beside it. It is a surprising result: the choice of risk becomes a choice of how much cash to hold, not of which assets.

An optimiser instead of random draws

Random search finds a point near the best mix. A numerical optimiser finds the mix itself, and naming its four parts is most of understanding it (Table 3):

Table 3. The parts of a maximum-Sharpe optimiser
PartFor maximum SharpeWhy it is there
Decision variablesone weight per assetthe thing being chosen
Objectivethe negative of the annualised Sharpe ratioa minimiser maximises by minimising the negative
Constraintsweights add up to 1fully invested
Boundseach weight between 0 and 1long only, no leverage
Search procedureSciPy’s SLSQP, a gradient-based local search from equal weightsit moves downhill until no small change helps

Three names that go with the frontier: the global minimum variance portfolio is the lowest-risk point on it and needs no return forecasts at all, only the covariance matrix, which makes it the hardest to get wrong; the tangency portfolio is the highest-Sharpe point, where the capital market line touches; and moving along that line, mixing the tangency portfolio with cash, is how an investor chooses risk without changing the mix.

Chosen on one period, run on the next. The optimiser on the five tickers, fitted to one period and then held through the next, against the 20%-each portfolio (Table 4):

Table 4. Optimiser weights chosen on one period and their Sharpe on the next
Chosen onWeights it choseSharpe, same periodSharpe, next periodEqual weights, next period
202067% GLD, 33% NVDA1.761.502.32
202129% SPY, 26% NVDA, 24% XOM, 22% GS2.480.060.12
2022100% XOM1.880.00\bad{0.00}2.47
2023100% NVDA2.832.222.37
202459% GLD, 31% GS, 10% NVDA2.652.741.78
2020 to 2023100% NVDA1.251.771.99

In 2022, when XOM had a Sharpe of 1.88 while SPY and NVDA were negative, the optimiser put everything in it, because any diversification would have lowered the in-sample ratio; the next year that portfolio made −2.9% while equal weights made +59.3%. In the first three windows equal weights won, and in two of them the in-sample Sharpe all but vanished out of sample (2.48 to 0.06, 1.88 to 0.00). Then the optimiser chose 100% NVDA, on 2023 and on 2020 to 2023, and NVDA kept running: +178.9% in 2024 against +58.2% for equal weights, +320.6% over 2024 to 2025 against +118.2% (Figure 2). It made more money and still lost on Sharpe, 2.22 against 2.37 and 1.77 against 1.99, because one stock’s risk is the whole portfolio’s risk. Equal weights won five of the six on Sharpe; the one it lost was 2024, the one window where the optimiser spread the money. All-in on one stock is not a portfolio; it is a bet that the last period repeats, and these years happen to be ones where it did.

{"panels":[{"x0":46.52,"x1":565.2,"y0":29.16,"y1":232.8,"title":"Weights chosen on 2020 to 2023, then run on 2024 to 2025, against equal weights","xlabel":"Date","ylabel":"Value of 1 dollar invested at the start of 2024","xlog":false}],"series":[{"panel":0,"label":"Sharpe-maximising weights from 2020 to 2023","color":"var(--chart-maroon, #b6262c)","kind":"line","x":["2024-01-02","2024-01-03","2024-01-04","2024-01-05","2024-01-08","2024-01-09","2024-01-10","2024-01-11","2024-01-12","2024-01-16","2024-01-17","2024-01-18","2024-01-19","2024-01-22","2024-01-23","2024-01-24","2024-01-25","2024-01-26","2024-01-29","2024-01-30","2024-01-31","2024-02-01","2024-02-02","2024-02-05","2024-02-06","2024-02-07","2024-02-08","2024-02-09","2024-02-12","2024-02-13","2024-02-14","2024-02-15","2024-02-16","2024-02-20","2024-02-21","2024-02-22","2024-02-23","2024-02-26","2024-02-27","2024-02-28","2024-02-29","2024-03-01","2024-03-04","2024-03-05","2024-03-06","2024-03-07","2024-03-08","2024-03-11","2024-03-12","2024-03-13","2024-03-14","2024-03-15","2024-03-18","2024-03-19","2024-03-20","2024-03-21","2024-03-22","2024-03-25","2024-03-26","2024-03-27","2024-03-28","2024-04-01","2024-04-02","2024-04-03","2024-04-04","2024-04-05","2024-04-08","2024-04-09","2024-04-10","2024-04-11","2024-04-12","2024-04-15","2024-04-16","2024-04-17","2024-04-18","2024-04-19","2024-04-22","2024-04-23","2024-04-24","2024-04-25","2024-04-26","2024-04-29","2024-04-30","2024-05-01","2024-05-02","2024-05-03","2024-05-06","2024-05-07","2024-05-08","2024-05-09","2024-05-10","2024-05-13","2024-05-14","2024-05-15","2024-05-16","2024-05-17","2024-05-20","2024-05-21","2024-05-22","2024-05-23","2024-05-24","2024-05-28","2024-05-29","2024-05-30","2024-05-31","2024-06-03","2024-06-04","2024-06-05","2024-06-06","2024-06-07","2024-06-10","2024-06-11","2024-06-12","2024-06-13","2024-06-14","2024-06-17","2024-06-18","2024-06-20","2024-06-21","2024-06-24","2024-06-25","2024-06-26","2024-06-27","2024-06-28","2024-07-01","2024-07-02","2024-07-03","2024-07-05","2024-07-08","2024-07-09","2024-07-10","2024-07-11","2024-07-12","2024-07-15","2024-07-16","2024-07-17","2024-07-18","2024-07-19","2024-07-22","2024-07-23","2024-07-24","2024-07-25","2024-07-26","2024-07-29","2024-07-30","2024-07-31","2024-08-01","2024-08-02","2024-08-05","2024-08-06","2024-08-07","2024-08-08","2024-08-09","2024-08-12","2024-08-13","2024-08-14","2024-08-15","2024-08-16","2024-08-19","2024-08-20","2024-08-21","2024-08-22","2024-08-23","2024-08-26","2024-08-27","2024-08-28","2024-08-29","2024-08-30","2024-09-03","2024-09-04","2024-09-05","2024-09-06","2024-09-09","2024-09-10","2024-09-11","2024-09-12","2024-09-13","2024-09-16","2024-09-17","2024-09-18","2024-09-19","2024-09-20","2024-09-23","2024-09-24","2024-09-25","2024-09-26","2024-09-27","2024-09-30","2024-10-01","2024-10-02","2024-10-03","2024-10-04","2024-10-07","2024-10-08","2024-10-09","2024-10-10","2024-10-11","2024-10-14","2024-10-15","2024-10-16","2024-10-17","2024-10-18","2024-10-21","2024-10-22","2024-10-23","2024-10-24","2024-10-25","2024-10-28","2024-10-29","2024-10-30","2024-10-31","2024-11-01","2024-11-04","2024-11-05","2024-11-06","2024-11-07","2024-11-08","2024-11-11","2024-11-12","2024-11-13","2024-11-14","2024-11-15","2024-11-18","2024-11-19","2024-11-20","2024-11-21","2024-11-22","2024-11-25","2024-11-26","2024-11-27","2024-11-29","2024-12-02","2024-12-03","2024-12-04","2024-12-05","2024-12-06","2024-12-09","2024-12-10","2024-12-11","2024-12-12","2024-12-13","2024-12-16","2024-12-17","2024-12-18","2024-12-19","2024-12-20","2024-12-23","2024-12-24","2024-12-26","2024-12-27","2024-12-30","2024-12-31","2025-01-02","2025-01-03","2025-01-06","2025-01-07","2025-01-08","2025-01-10","2025-01-13","2025-01-14","2025-01-15","2025-01-16","2025-01-17","2025-01-21","2025-01-22","2025-01-23","2025-01-24","2025-01-27","2025-01-28","2025-01-29","2025-01-30","2025-01-31","2025-02-03","2025-02-04","2025-02-05","2025-02-06","2025-02-07","2025-02-10","2025-02-11","2025-02-12","2025-02-13","2025-02-14","2025-02-18","2025-02-19","2025-02-20","2025-02-21","2025-02-24","2025-02-25","2025-02-26","2025-02-27","2025-02-28","2025-03-03","2025-03-04","2025-03-05","2025-03-06","2025-03-07","2025-03-10","2025-03-11","2025-03-12","2025-03-13","2025-03-14","2025-03-17","2025-03-18","2025-03-19","2025-03-20","2025-03-21","2025-03-24","2025-03-25","2025-03-26","2025-03-27","2025-03-28","2025-03-31","2025-04-01","2025-04-02","2025-04-03","2025-04-04","2025-04-07","2025-04-08","2025-04-09","2025-04-10","2025-04-11","2025-04-14","2025-04-15","2025-04-16","2025-04-17","2025-04-21","2025-04-22","2025-04-23","2025-04-24","2025-04-25","2025-04-28","2025-04-29","2025-04-30","2025-05-01","2025-05-02","2025-05-05","2025-05-06","2025-05-07","2025-05-08","2025-05-09","2025-05-12","2025-05-13","2025-05-14","2025-05-15","2025-05-16","2025-05-19","2025-05-20","2025-05-21","2025-05-22","2025-05-23","2025-05-27","2025-05-28","2025-05-29","2025-05-30","2025-06-02","2025-06-03","2025-06-04","2025-06-05","2025-06-06","2025-06-09","2025-06-10","2025-06-11","2025-06-12","2025-06-13","2025-06-16","2025-06-17","2025-06-18","2025-06-20","2025-06-23","2025-06-24","2025-06-25","2025-06-26","2025-06-27","2025-06-30","2025-07-01","2025-07-02","2025-07-03","2025-07-07","2025-07-08","2025-07-09","2025-07-10","2025-07-11","2025-07-14","2025-07-15","2025-07-16","2025-07-17","2025-07-18","2025-07-21","2025-07-22","2025-07-23","2025-07-24","2025-07-25","2025-07-28","2025-07-29","2025-07-30","2025-07-31","2025-08-01","2025-08-04","2025-08-05","2025-08-06","2025-08-07","2025-08-08","2025-08-11","2025-08-12","2025-08-13","2025-08-14","2025-08-15","2025-08-18","2025-08-19","2025-08-20","2025-08-21","2025-08-22","2025-08-25","2025-08-26","2025-08-27","2025-08-28","2025-08-29","2025-09-02","2025-09-03","2025-09-04","2025-09-05","2025-09-08","2025-09-09","2025-09-10","2025-09-11","2025-09-12","2025-09-15","2025-09-16","2025-09-17","2025-09-18","2025-09-19","2025-09-22","2025-09-23","2025-09-24","2025-09-25","2025-09-26","2025-09-29","2025-09-30","2025-10-01","2025-10-02","2025-10-03","2025-10-06","2025-10-07","2025-10-08","2025-10-09","2025-10-10","2025-10-13","2025-10-14","2025-10-15","2025-10-16","2025-10-17","2025-10-20","2025-10-21","2025-10-22","2025-10-23","2025-10-24","2025-10-27","2025-10-28","2025-10-29","2025-10-30","2025-10-31"],"y":[1.0,0.987564,0.996471,1.01929,1.08481,1.10322,1.12834,1.13814,1.13582,1.17053,1.1637,1.18558,1.23507,1.23846,1.243,1.27392,1.27921,1.26704,1.29682,1.30323,1.27734,1.30848,1.37353,1.43938,1.41635,1.4553,1.44579,1.49753,1.49992,1.49743,1.53421,1.50843,1.50749,1.44187,1.40076,1.6305,1.63629,1.642,1.63388,1.61233,1.64242,1.70817,1.76958,1.78475,1.84156,1.92396,1.81722,1.78081,1.90827,1.88698,1.82586,1.82364,1.83647,1.85605,1.87627,1.89834,1.95759,1.9724,1.92172,1.87374,1.87594,1.87608,1.85717,1.84704,1.78353,1.82719,1.80903,1.77209,1.80707,1.88134,1.83088,1.78552,1.81488,1.74471,1.75791,1.58204,1.65092,1.71124,1.65423,1.71558,1.82152,1.82198,1.79385,1.72407,1.7817,1.8434,1.91298,1.88005,1.8771,1.84253,1.86602,1.87683,1.8967,1.96468,1.95905,1.92001,1.96779,1.98037,1.97132,2.15504,2.21047,2.36477,2.38396,2.29416,2.27616,2.38759,2.41742,2.54206,2.51212,2.50983,2.52856,2.5105,2.59957,2.69114,2.73827,2.71958,2.81509,2.71543,2.62802,2.45236,2.61805,2.62449,2.57445,2.5651,2.58088,2.54704,2.66352,2.61265,2.66186,2.72789,2.80118,2.64525,2.68345,2.66684,2.62366,2.44987,2.51423,2.44862,2.5651,2.54538,2.37221,2.33131,2.3475,2.31698,2.15378,2.42973,2.26756,2.22728,2.08568,2.16458,2.0537,2.17953,2.17496,2.26362,2.41146,2.45174,2.55098,2.5867,2.69923,2.64214,2.66809,2.56926,2.68615,2.62573,2.66394,2.60808,2.44156,2.47852,2.24244,2.20527,2.22604,2.1351,2.21067,2.24452,2.42744,2.47396,2.47313,2.42495,2.40024,2.35414,2.44759,2.40875,2.41415,2.50988,2.5647,2.57571,2.52089,2.52172,2.42952,2.46793,2.55099,2.59398,2.65212,2.75948,2.75449,2.79935,2.79914,2.86704,2.73269,2.81824,2.84337,2.86559,2.98416,2.98166,2.89798,2.91563,2.93909,2.91792,2.93307,2.89341,2.75678,2.8116,2.82509,2.90525,3.02361,3.09151,3.06555,3.01634,3.07926,3.03732,3.04749,2.94823,2.91023,3.05268,3.02942,3.04562,2.94761,2.82447,2.84316,2.81035,2.87078,2.87867,2.91252,3.01385,3.0124,2.95799,2.88261,2.80494,2.89299,2.85208,2.78791,2.74118,2.70775,2.67702,2.71377,2.79725,2.90046,2.91189,2.90586,2.84523,2.85519,2.78874,2.87222,3.00014,3.10315,2.91022,2.9096,2.82238,2.76673,2.7362,2.82924,2.77379,2.85976,2.92455,3.05414,3.05725,2.96173,2.45917,2.67868,2.56882,2.58855,2.49344,2.42263,2.46395,2.59229,2.67224,2.69633,2.77379,2.7578,2.72333,2.80951,2.88344,2.89486,2.89133,2.9096,2.79165,2.70547,2.62967,2.72623,2.4951,2.59416,2.36863,2.40871,2.43592,2.29616,2.34018,2.22161,2.25857,2.40374,2.40042,2.5269,2.48245,2.3973,2.44071,2.46169,2.44445,2.5215,2.50655,2.36262,2.31423,2.27768,2.25089,2.28765,2.29325,2.11423,1.95867,2.02783,2.0,2.37446,2.23406,2.30384,2.29928,2.33022,2.1701,2.10779,2.01267,2.05379,2.13313,2.21039,2.30551,2.25816,2.26418,2.2621,2.31797,2.37799,2.36387,2.35805,2.43116,2.43759,2.42264,2.55452,2.69845,2.8108,2.80021,2.81205,2.81558,2.79087,2.73728,2.75867,2.72669,2.81413,2.7998,2.89076,2.80644,2.85317,2.93292,2.94746,2.90738,2.94331,2.96221,2.98983,2.96657,3.01164,2.9487,3.0052,2.99336,3.02161,2.98775,2.9944,3.07187,3.205,3.21975,3.27645,3.28144,3.18403,3.26607,3.30948,3.28663,3.32319,3.383,3.40834,3.42537,3.40772,3.54542,3.55934,3.59319,3.58094,3.55955,3.4692,3.54708,3.60856,3.60358,3.67108,3.64533,3.72342,3.69434,3.60815,3.73858,3.70244,3.72654,3.75458,3.79466,3.78137,3.80422,3.77161,3.78054,3.74793,3.78033,3.64803,3.64304,3.63432,3.69684,3.73464,3.77535,3.77181,3.74211,3.6177,3.54708,3.54376,3.56536,3.46899,3.49578,3.54667,3.68313,3.68001,3.69351,3.69206,3.63245,3.53711,3.6607,3.66963,3.81378,3.70618,3.67586,3.69081,3.7012,3.77722,3.87547,3.88918,3.92345,3.89707,3.85386,3.84348,3.92802,3.99989,3.80443,3.91161,3.73942,3.73526,3.77639,3.80568,3.79363,3.76289,3.74461,3.78366,3.86882,3.97745,4.17561,4.30044,4.21424,4.20593],"sx":[70.1,70.8,71.51,72.22,74.33,75.04,75.75,76.45,77.16,79.98,80.69,81.39,82.1,84.22,84.92,85.63,86.33,87.04,89.16,89.86,90.57,91.27,91.98,94.1,94.8,95.51,96.22,96.92,99.04,99.75,100.45,101.16,101.86,104.69,105.39,106.1,106.8,108.92,109.63,110.33,111.04,111.75,113.86,114.57,115.27,115.98,116.69,118.8,119.51,120.22,120.92,121.63,123.75,124.45,125.16,125.86,126.57,128.69,129.39,130.1,130.8,133.63,134.33,135.04,135.75,136.45,138.57,139.27,139.98,140.69,141.39,143.51,144.22,144.92,145.63,146.33,148.45,149.16,149.86,150.57,151.27,153.39,154.1,154.8,155.51,156.22,158.33,159.04,159.74,160.45,161.16,163.27,163.98,164.69,165.39,166.1,168.22,168.92,169.63,170.33,171.04,173.86,174.57,175.27,175.98,178.1,178.8,179.51,180.22,180.92,183.04,183.74,184.45,185.16,185.86,187.98,188.69,190.1,190.8,192.92,193.63,194.33,195.04,195.74,197.86,198.57,199.27,200.69,202.8,203.51,204.22,204.92,205.63,207.74,208.45,209.16,209.86,210.57,212.69,213.39,214.1,214.8,215.51,217.63,218.33,219.04,219.74,220.45,222.57,223.27,223.98,224.69,225.39,227.51,228.21,228.92,229.63,230.33,232.45,233.16,233.86,234.57,235.27,237.39,238.1,238.8,239.51,240.21,243.04,243.74,244.45,245.16,247.27,247.98,248.69,249.39,250.1,252.21,252.92,253.63,254.33,255.04,257.16,257.86,258.57,259.27,259.98,262.1,262.8,263.51,264.21,264.92,267.04,267.74,268.45,269.16,269.86,271.98,272.69,273.39,274.1,274.8,276.92,277.63,278.33,279.04,279.74,281.86,282.57,283.27,283.98,284.68,286.8,287.51,288.21,288.92,289.63,291.74,292.45,293.16,293.86,294.57,296.68,297.39,298.1,298.8,299.51,301.63,302.33,303.04,304.45,306.57,307.27,307.98,308.68,309.39,311.51,312.21,312.92,313.63,314.33,316.45,317.16,317.86,318.57,319.27,321.39,322.1,323.51,324.21,326.33,327.04,328.45,329.16,331.27,331.98,332.68,334.1,336.21,336.92,337.63,338.33,339.04,341.86,342.57,343.27,343.98,346.1,346.8,347.51,348.21,348.92,351.04,351.74,352.45,353.15,353.86,355.98,356.68,357.39,358.1,358.8,361.63,362.33,363.04,363.74,365.86,366.57,367.27,367.98,368.68,370.8,371.51,372.21,372.92,373.63,375.74,376.45,377.15,377.86,378.57,380.68,381.39,382.1,382.8,383.51,385.63,386.33,387.04,387.74,388.45,390.57,391.27,391.98,392.68,393.39,395.51,396.21,396.92,397.63,398.33,400.45,401.15,401.86,402.57,405.39,406.1,406.8,407.51,408.21,410.33,411.04,411.74,412.45,413.15,415.27,415.98,416.68,417.39,418.1,420.21,420.92,421.62,422.33,423.04,425.15,425.86,426.57,427.27,427.98,430.8,431.51,432.21,432.92,435.04,435.74,436.45,437.15,437.86,439.98,440.68,441.39,442.1,442.8,444.92,445.62,446.33,447.74,449.86,450.57,451.27,451.98,452.68,454.8,455.51,456.21,456.92,459.74,460.45,461.15,461.86,462.57,464.68,465.39,466.1,466.8,467.51,469.62,470.33,471.04,471.74,472.45,474.57,475.27,475.98,476.68,477.39,479.51,480.21,480.92,481.62,482.33,484.45,485.15,485.86,486.57,487.27,489.39,490.09,490.8,491.51,492.21,494.33,495.04,495.74,496.45,497.15,499.98,500.68,501.39,502.09,504.21,504.92,505.62,506.33,507.04,509.15,509.86,510.57,511.27,511.98,514.09,514.8,515.51,516.21,516.92,519.04,519.74,520.45,521.15,521.86,523.98,524.68,525.39,526.09,526.8,528.92,529.62,530.33,531.04,531.74,533.86,534.56,535.27,535.98,536.68,538.8,539.51,540.21,540.92,541.62],"sy":[222.85,223.54,223.05,221.77,218.11,217.08,215.68,215.13,215.26,213.32,213.7,212.48,209.71,209.52,209.27,207.54,207.25,207.93,206.26,205.9,207.35,205.61,201.98,198.3,199.58,197.41,197.94,195.05,194.91,195.05,193.0,194.44,194.49,198.16,200.45,187.62,187.29,186.97,187.43,188.63,186.95,183.27,179.84,179.0,175.82,171.22,177.18,179.22,172.09,173.28,176.7,176.82,176.11,175.01,173.88,172.65,169.34,168.51,171.34,174.02,173.9,173.89,174.95,175.51,179.06,176.62,177.64,179.7,177.75,173.6,176.42,178.95,177.31,181.23,180.5,190.32,186.47,183.1,186.29,182.86,176.94,176.91,178.49,182.39,179.17,175.72,171.83,173.67,173.83,175.77,174.45,173.85,172.74,168.94,169.26,171.44,168.77,168.06,168.57,158.3,155.21,146.58,145.51,150.53,151.53,145.31,143.64,136.68,138.35,138.48,137.43,138.44,133.46,128.34,125.71,126.76,121.42,126.99,131.87,141.69,132.43,132.07,134.87,135.39,134.51,136.4,129.89,132.73,129.98,126.29,122.2,130.91,128.77,129.7,132.12,141.83,138.23,141.9,135.39,136.49,146.17,148.45,147.55,149.25,158.37,142.95,152.01,154.27,162.18,157.77,163.97,156.93,157.19,152.24,143.97,141.72,136.18,134.18,127.89,131.08,129.63,135.16,128.62,132.0,129.86,132.99,142.29,140.23,153.42,155.5,154.34,159.42,155.19,153.3,143.08,140.48,140.53,143.22,144.6,147.18,141.95,144.12,143.82,138.47,135.41,134.8,137.86,137.81,142.96,140.82,136.18,133.77,130.53,124.53,124.8,122.3,122.31,118.52,126.02,121.24,119.84,118.6,111.97,112.11,116.79,115.8,114.49,115.67,114.83,117.04,124.68,121.61,120.86,116.38,109.77,105.97,107.42,110.17,106.66,109.0,108.43,113.98,116.1,108.14,109.44,108.54,114.01,120.89,119.85,121.68,118.31,117.87,115.97,110.31,110.39,113.43,117.65,121.99,117.07,119.35,122.94,125.55,127.42,129.13,127.08,122.41,116.65,116.01,116.35,119.73,119.18,122.89,118.23,111.08,105.32,116.1,116.14,121.01,124.12,125.83,120.63,123.73,118.92,115.3,108.06,107.89,113.22,141.31,129.04,135.18,134.08,139.39,143.35,141.04,133.87,129.4,128.05,123.73,124.62,126.55,121.73,117.6,116.96,117.16,116.14,122.73,127.54,131.78,126.38,139.3,133.76,146.37,144.13,142.61,150.42,147.96,154.58,152.52,144.4,144.59,137.52,140.01,144.76,142.34,141.17,142.13,137.82,138.66,146.7,149.41,151.45,152.95,150.89,150.58,160.58,169.28,165.41,166.97,146.04,153.89,149.99,150.24,148.51,157.46,160.94,166.26,163.96,159.53,155.21,149.89,152.54,152.2,152.32,149.2,145.84,146.63,146.96,142.87,142.51,143.35,135.98,127.94,121.66,122.25,121.59,121.39,122.77,125.77,124.57,126.36,121.47,122.27,117.19,121.9,119.29,114.83,114.02,116.26,114.25,113.2,111.65,112.95,110.43,113.95,110.79,111.46,109.88,111.77,111.4,107.07,99.63,98.8,95.64,95.36,100.8,96.22,93.79,95.07,93.02,89.68,88.27,87.31,88.3,80.61,79.83,77.94,78.62,79.82,84.87,80.51,77.08,77.36,73.58,75.02,70.66,72.28,77.1,69.81,71.83,70.48,68.92,66.68,67.42,66.14,67.97,67.47,69.29,67.48,74.87,75.15,75.64,72.14,70.03,67.76,67.95,69.61,76.57,80.51,80.7,79.49,84.88,83.38,80.54,72.91,73.08,72.33,72.41,75.74,81.07,74.16,73.67,65.61,71.62,73.32,72.48,71.9,67.65,62.16,61.4,59.48,60.96,63.37,63.95,59.23,55.21,66.13,60.14,69.77,70.0,67.7,66.06,66.74,68.45,69.47,67.29,62.53,56.46,45.39,38.41,43.23,43.7]},{"panel":0,"label":"equal weights, 20% each","color":"var(--chart-blue, #3b6ea5)","kind":"line","x":["2024-01-02","2024-01-03","2024-01-04","2024-01-05","2024-01-08","2024-01-09","2024-01-10","2024-01-11","2024-01-12","2024-01-16","2024-01-17","2024-01-18","2024-01-19","2024-01-22","2024-01-23","2024-01-24","2024-01-25","2024-01-26","2024-01-29","2024-01-30","2024-01-31","2024-02-01","2024-02-02","2024-02-05","2024-02-06","2024-02-07","2024-02-08","2024-02-09","2024-02-12","2024-02-13","2024-02-14","2024-02-15","2024-02-16","2024-02-20","2024-02-21","2024-02-22","2024-02-23","2024-02-26","2024-02-27","2024-02-28","2024-02-29","2024-03-01","2024-03-04","2024-03-05","2024-03-06","2024-03-07","2024-03-08","2024-03-11","2024-03-12","2024-03-13","2024-03-14","2024-03-15","2024-03-18","2024-03-19","2024-03-20","2024-03-21","2024-03-22","2024-03-25","2024-03-26","2024-03-27","2024-03-28","2024-04-01","2024-04-02","2024-04-03","2024-04-04","2024-04-05","2024-04-08","2024-04-09","2024-04-10","2024-04-11","2024-04-12","2024-04-15","2024-04-16","2024-04-17","2024-04-18","2024-04-19","2024-04-22","2024-04-23","2024-04-24","2024-04-25","2024-04-26","2024-04-29","2024-04-30","2024-05-01","2024-05-02","2024-05-03","2024-05-06","2024-05-07","2024-05-08","2024-05-09","2024-05-10","2024-05-13","2024-05-14","2024-05-15","2024-05-16","2024-05-17","2024-05-20","2024-05-21","2024-05-22","2024-05-23","2024-05-24","2024-05-28","2024-05-29","2024-05-30","2024-05-31","2024-06-03","2024-06-04","2024-06-05","2024-06-06","2024-06-07","2024-06-10","2024-06-11","2024-06-12","2024-06-13","2024-06-14","2024-06-17","2024-06-18","2024-06-20","2024-06-21","2024-06-24","2024-06-25","2024-06-26","2024-06-27","2024-06-28","2024-07-01","2024-07-02","2024-07-03","2024-07-05","2024-07-08","2024-07-09","2024-07-10","2024-07-11","2024-07-12","2024-07-15","2024-07-16","2024-07-17","2024-07-18","2024-07-19","2024-07-22","2024-07-23","2024-07-24","2024-07-25","2024-07-26","2024-07-29","2024-07-30","2024-07-31","2024-08-01","2024-08-02","2024-08-05","2024-08-06","2024-08-07","2024-08-08","2024-08-09","2024-08-12","2024-08-13","2024-08-14","2024-08-15","2024-08-16","2024-08-19","2024-08-20","2024-08-21","2024-08-22","2024-08-23","2024-08-26","2024-08-27","2024-08-28","2024-08-29","2024-08-30","2024-09-03","2024-09-04","2024-09-05","2024-09-06","2024-09-09","2024-09-10","2024-09-11","2024-09-12","2024-09-13","2024-09-16","2024-09-17","2024-09-18","2024-09-19","2024-09-20","2024-09-23","2024-09-24","2024-09-25","2024-09-26","2024-09-27","2024-09-30","2024-10-01","2024-10-02","2024-10-03","2024-10-04","2024-10-07","2024-10-08","2024-10-09","2024-10-10","2024-10-11","2024-10-14","2024-10-15","2024-10-16","2024-10-17","2024-10-18","2024-10-21","2024-10-22","2024-10-23","2024-10-24","2024-10-25","2024-10-28","2024-10-29","2024-10-30","2024-10-31","2024-11-01","2024-11-04","2024-11-05","2024-11-06","2024-11-07","2024-11-08","2024-11-11","2024-11-12","2024-11-13","2024-11-14","2024-11-15","2024-11-18","2024-11-19","2024-11-20","2024-11-21","2024-11-22","2024-11-25","2024-11-26","2024-11-27","2024-11-29","2024-12-02","2024-12-03","2024-12-04","2024-12-05","2024-12-06","2024-12-09","2024-12-10","2024-12-11","2024-12-12","2024-12-13","2024-12-16","2024-12-17","2024-12-18","2024-12-19","2024-12-20","2024-12-23","2024-12-24","2024-12-26","2024-12-27","2024-12-30","2024-12-31","2025-01-02","2025-01-03","2025-01-06","2025-01-07","2025-01-08","2025-01-10","2025-01-13","2025-01-14","2025-01-15","2025-01-16","2025-01-17","2025-01-21","2025-01-22","2025-01-23","2025-01-24","2025-01-27","2025-01-28","2025-01-29","2025-01-30","2025-01-31","2025-02-03","2025-02-04","2025-02-05","2025-02-06","2025-02-07","2025-02-10","2025-02-11","2025-02-12","2025-02-13","2025-02-14","2025-02-18","2025-02-19","2025-02-20","2025-02-21","2025-02-24","2025-02-25","2025-02-26","2025-02-27","2025-02-28","2025-03-03","2025-03-04","2025-03-05","2025-03-06","2025-03-07","2025-03-10","2025-03-11","2025-03-12","2025-03-13","2025-03-14","2025-03-17","2025-03-18","2025-03-19","2025-03-20","2025-03-21","2025-03-24","2025-03-25","2025-03-26","2025-03-27","2025-03-28","2025-03-31","2025-04-01","2025-04-02","2025-04-03","2025-04-04","2025-04-07","2025-04-08","2025-04-09","2025-04-10","2025-04-11","2025-04-14","2025-04-15","2025-04-16","2025-04-17","2025-04-21","2025-04-22","2025-04-23","2025-04-24","2025-04-25","2025-04-28","2025-04-29","2025-04-30","2025-05-01","2025-05-02","2025-05-05","2025-05-06","2025-05-07","2025-05-08","2025-05-09","2025-05-12","2025-05-13","2025-05-14","2025-05-15","2025-05-16","2025-05-19","2025-05-20","2025-05-21","2025-05-22","2025-05-23","2025-05-27","2025-05-28","2025-05-29","2025-05-30","2025-06-02","2025-06-03","2025-06-04","2025-06-05","2025-06-06","2025-06-09","2025-06-10","2025-06-11","2025-06-12","2025-06-13","2025-06-16","2025-06-17","2025-06-18","2025-06-20","2025-06-23","2025-06-24","2025-06-25","2025-06-26","2025-06-27","2025-06-30","2025-07-01","2025-07-02","2025-07-03","2025-07-07","2025-07-08","2025-07-09","2025-07-10","2025-07-11","2025-07-14","2025-07-15","2025-07-16","2025-07-17","2025-07-18","2025-07-21","2025-07-22","2025-07-23","2025-07-24","2025-07-25","2025-07-28","2025-07-29","2025-07-30","2025-07-31","2025-08-01","2025-08-04","2025-08-05","2025-08-06","2025-08-07","2025-08-08","2025-08-11","2025-08-12","2025-08-13","2025-08-14","2025-08-15","2025-08-18","2025-08-19","2025-08-20","2025-08-21","2025-08-22","2025-08-25","2025-08-26","2025-08-27","2025-08-28","2025-08-29","2025-09-02","2025-09-03","2025-09-04","2025-09-05","2025-09-08","2025-09-09","2025-09-10","2025-09-11","2025-09-12","2025-09-15","2025-09-16","2025-09-17","2025-09-18","2025-09-19","2025-09-22","2025-09-23","2025-09-24","2025-09-25","2025-09-26","2025-09-29","2025-09-30","2025-10-01","2025-10-02","2025-10-03","2025-10-06","2025-10-07","2025-10-08","2025-10-09","2025-10-10","2025-10-13","2025-10-14","2025-10-15","2025-10-16","2025-10-17","2025-10-20","2025-10-21","2025-10-22","2025-10-23","2025-10-24","2025-10-27","2025-10-28","2025-10-29","2025-10-30","2025-10-31"],"y":[1.0,0.992539,0.99272,0.999989,1.01227,1.01063,1.01351,1.01459,1.01767,1.01896,1.01123,1.0185,1.03451,1.03656,1.03829,1.04567,1.05526,1.0516,1.06225,1.07026,1.05609,1.06614,1.08069,1.08869,1.0881,1.09838,1.09898,1.10508,1.112,1.09699,1.10478,1.11188,1.11084,1.09585,1.0939,1.14524,1.14614,1.14644,1.14487,1.14387,1.14992,1.17095,1.18551,1.18945,1.20513,1.22552,1.20589,1.19964,1.22481,1.2262,1.21457,1.21084,1.21559,1.22425,1.23667,1.25152,1.25768,1.26202,1.2511,1.25192,1.25883,1.25999,1.26079,1.26298,1.24312,1.26212,1.25968,1.25512,1.2546,1.27299,1.24987,1.24688,1.24861,1.23514,1.2375,1.20434,1.22259,1.24099,1.22861,1.24041,1.26161,1.267,1.24859,1.23167,1.24782,1.26507,1.28791,1.27945,1.27981,1.28668,1.29213,1.29105,1.30191,1.32696,1.32224,1.32374,1.33009,1.33506,1.3194,1.34379,1.35795,1.3935,1.38982,1.36934,1.37621,1.3943,1.39511,1.4296,1.42511,1.41208,1.41851,1.40943,1.42956,1.44351,1.45417,1.45155,1.47795,1.46522,1.43783,1.41559,1.44668,1.44546,1.43416,1.43515,1.44497,1.43922,1.46847,1.45831,1.46322,1.47876,1.50171,1.47537,1.48473,1.49312,1.49786,1.46136,1.46486,1.43984,1.46513,1.4606,1.42014,1.41455,1.42639,1.41435,1.39372,1.45947,1.41499,1.38666,1.33847,1.35905,1.33971,1.38466,1.38957,1.40927,1.4433,1.45583,1.48202,1.49663,1.52194,1.49928,1.50304,1.48092,1.51887,1.51117,1.51722,1.49856,1.4733,1.48249,1.41237,1.40345,1.40581,1.37648,1.40464,1.39384,1.43235,1.45246,1.45843,1.4555,1.45234,1.44086,1.48042,1.47112,1.47695,1.50005,1.50194,1.5055,1.49901,1.49912,1.484,1.49598,1.511,1.53056,1.5399,1.55613,1.56006,1.5718,1.58355,1.60307,1.56748,1.5915,1.59703,1.60425,1.62203,1.62574,1.60208,1.61064,1.60935,1.61047,1.61391,1.60559,1.56593,1.57398,1.57973,1.60814,1.67018,1.6829,1.68069,1.67057,1.67481,1.6671,1.66406,1.64059,1.63784,1.66265,1.66322,1.68065,1.66839,1.63336,1.63618,1.62874,1.64687,1.6444,1.65163,1.66565,1.66304,1.65182,1.63364,1.61543,1.63998,1.6259,1.60466,1.5927,1.57688,1.54203,1.5498,1.57924,1.60354,1.6157,1.61558,1.5963,1.59174,1.58227,1.60251,1.63304,1.65626,1.61655,1.61442,1.58424,1.57802,1.579,1.62585,1.61942,1.64662,1.66889,1.69264,1.69913,1.67654,1.57069,1.61718,1.59407,1.60965,1.58145,1.56328,1.58271,1.61691,1.63688,1.63951,1.66281,1.65846,1.64516,1.66946,1.68636,1.70405,1.70232,1.69483,1.65505,1.63965,1.61039,1.63122,1.57288,1.60643,1.5442,1.53845,1.54918,1.50633,1.51527,1.47334,1.4765,1.51023,1.50469,1.55037,1.55396,1.53768,1.55674,1.56369,1.55844,1.58543,1.58902,1.55409,1.53895,1.52022,1.52487,1.53367,1.54395,1.45414,1.36458,1.36606,1.35249,1.4997,1.44228,1.47511,1.48021,1.48886,1.45939,1.45694,1.43495,1.46011,1.47471,1.51073,1.52755,1.52366,1.52399,1.51497,1.52485,1.54835,1.544,1.54736,1.55918,1.56602,1.5683,1.61025,1.64924,1.66756,1.67611,1.67716,1.67502,1.66884,1.6466,1.64925,1.64839,1.67567,1.66385,1.68422,1.66341,1.68327,1.70204,1.70142,1.6931,1.7079,1.71461,1.72704,1.73264,1.74806,1.73562,1.75299,1.75,1.75783,1.75639,1.75839,1.77274,1.80468,1.82187,1.82938,1.8412,1.82676,1.85491,1.87,1.85463,1.85749,1.8713,1.88686,1.8912,1.88834,1.90556,1.91281,1.91776,1.90924,1.90982,1.89293,1.91868,1.93172,1.93329,1.94393,1.94634,1.95339,1.9443,1.91746,1.9536,1.94226,1.949,1.95331,1.96595,1.95495,1.97562,1.97476,1.9754,1.95984,1.96636,1.93299,1.93643,1.93139,1.96963,1.97448,1.99104,1.99463,1.99418,1.97171,1.95653,1.95411,1.97007,1.94225,1.95548,1.97899,2.01523,2.02378,2.02462,2.03348,2.02606,2.00981,2.03702,2.04202,2.077,2.05981,2.04336,2.04992,2.06325,2.07989,2.09657,2.09349,2.09464,2.10212,2.10718,2.1023,2.11973,2.1256,2.06965,2.11997,2.07954,2.08397,2.09245,2.09151,2.11462,2.07899,2.07032,2.08737,2.12195,2.14052,2.17742,2.19919,2.18631,2.18239],"sx":[70.1,70.8,71.51,72.22,74.33,75.04,75.75,76.45,77.16,79.98,80.69,81.39,82.1,84.22,84.92,85.63,86.33,87.04,89.16,89.86,90.57,91.27,91.98,94.1,94.8,95.51,96.22,96.92,99.04,99.75,100.45,101.16,101.86,104.69,105.39,106.1,106.8,108.92,109.63,110.33,111.04,111.75,113.86,114.57,115.27,115.98,116.69,118.8,119.51,120.22,120.92,121.63,123.75,124.45,125.16,125.86,126.57,128.69,129.39,130.1,130.8,133.63,134.33,135.04,135.75,136.45,138.57,139.27,139.98,140.69,141.39,143.51,144.22,144.92,145.63,146.33,148.45,149.16,149.86,150.57,151.27,153.39,154.1,154.8,155.51,156.22,158.33,159.04,159.74,160.45,161.16,163.27,163.98,164.69,165.39,166.1,168.22,168.92,169.63,170.33,171.04,173.86,174.57,175.27,175.98,178.1,178.8,179.51,180.22,180.92,183.04,183.74,184.45,185.16,185.86,187.98,188.69,190.1,190.8,192.92,193.63,194.33,195.04,195.74,197.86,198.57,199.27,200.69,202.8,203.51,204.22,204.92,205.63,207.74,208.45,209.16,209.86,210.57,212.69,213.39,214.1,214.8,215.51,217.63,218.33,219.04,219.74,220.45,222.57,223.27,223.98,224.69,225.39,227.51,228.21,228.92,229.63,230.33,232.45,233.16,233.86,234.57,235.27,237.39,238.1,238.8,239.51,240.21,243.04,243.74,244.45,245.16,247.27,247.98,248.69,249.39,250.1,252.21,252.92,253.63,254.33,255.04,257.16,257.86,258.57,259.27,259.98,262.1,262.8,263.51,264.21,264.92,267.04,267.74,268.45,269.16,269.86,271.98,272.69,273.39,274.1,274.8,276.92,277.63,278.33,279.04,279.74,281.86,282.57,283.27,283.98,284.68,286.8,287.51,288.21,288.92,289.63,291.74,292.45,293.16,293.86,294.57,296.68,297.39,298.1,298.8,299.51,301.63,302.33,303.04,304.45,306.57,307.27,307.98,308.68,309.39,311.51,312.21,312.92,313.63,314.33,316.45,317.16,317.86,318.57,319.27,321.39,322.1,323.51,324.21,326.33,327.04,328.45,329.16,331.27,331.98,332.68,334.1,336.21,336.92,337.63,338.33,339.04,341.86,342.57,343.27,343.98,346.1,346.8,347.51,348.21,348.92,351.04,351.74,352.45,353.15,353.86,355.98,356.68,357.39,358.1,358.8,361.63,362.33,363.04,363.74,365.86,366.57,367.27,367.98,368.68,370.8,371.51,372.21,372.92,373.63,375.74,376.45,377.15,377.86,378.57,380.68,381.39,382.1,382.8,383.51,385.63,386.33,387.04,387.74,388.45,390.57,391.27,391.98,392.68,393.39,395.51,396.21,396.92,397.63,398.33,400.45,401.15,401.86,402.57,405.39,406.1,406.8,407.51,408.21,410.33,411.04,411.74,412.45,413.15,415.27,415.98,416.68,417.39,418.1,420.21,420.92,421.62,422.33,423.04,425.15,425.86,426.57,427.27,427.98,430.8,431.51,432.21,432.92,435.04,435.74,436.45,437.15,437.86,439.98,440.68,441.39,442.1,442.8,444.92,445.62,446.33,447.74,449.86,450.57,451.27,451.98,452.68,454.8,455.51,456.21,456.92,459.74,460.45,461.15,461.86,462.57,464.68,465.39,466.1,466.8,467.51,469.62,470.33,471.04,471.74,472.45,474.57,475.27,475.98,476.68,477.39,479.51,480.21,480.92,481.62,482.33,484.45,485.15,485.86,486.57,487.27,489.39,490.09,490.8,491.51,492.21,494.33,495.04,495.74,496.45,497.15,499.98,500.68,501.39,502.09,504.21,504.92,505.62,506.33,507.04,509.15,509.86,510.57,511.27,511.98,514.09,514.8,515.51,516.21,516.92,519.04,519.74,520.45,521.15,521.86,523.98,524.68,525.39,526.09,526.8,528.92,529.62,530.33,531.04,531.74,533.86,534.56,535.27,535.98,536.68,538.8,539.51,540.21,540.92,541.62],"sy":[222.85,223.27,223.26,222.85,222.16,222.25,222.09,222.03,221.86,221.79,222.22,221.81,220.92,220.81,220.71,220.3,219.76,219.97,219.37,218.92,219.71,219.15,218.34,217.89,217.93,217.35,217.32,216.98,216.59,217.43,216.99,216.6,216.65,217.49,217.6,214.73,214.68,214.67,214.75,214.81,214.47,213.3,212.48,212.26,211.39,210.25,211.34,211.69,210.29,210.21,210.86,211.07,210.8,210.32,209.62,208.79,208.45,208.21,208.82,208.77,208.38,208.32,208.28,208.15,209.26,208.2,208.34,208.59,208.62,207.59,208.89,209.05,208.96,209.71,209.58,211.43,210.41,209.38,210.07,209.41,208.23,207.93,208.96,209.9,209.0,208.04,206.76,207.23,207.21,206.83,206.52,206.58,205.98,204.58,204.84,204.76,204.4,204.12,205.0,203.64,202.85,200.86,201.06,202.21,201.83,200.81,200.77,198.84,199.09,199.82,199.46,199.97,198.84,198.06,197.47,197.62,196.14,196.85,198.38,199.62,197.89,197.96,198.59,198.53,197.98,198.3,196.67,197.24,196.96,196.09,194.81,196.28,195.76,195.29,195.03,197.07,196.87,198.27,196.86,197.11,199.37,199.68,199.02,199.69,200.85,197.17,199.66,201.24,203.93,202.78,203.87,201.35,201.08,199.98,198.08,197.38,195.91,195.1,193.68,194.95,194.74,195.97,193.85,194.28,193.95,194.99,196.4,195.89,199.8,200.3,200.17,201.81,200.24,200.84,198.69,197.56,197.23,197.39,197.57,198.21,196.0,196.52,196.2,194.9,194.8,194.6,194.96,194.96,195.8,195.13,194.29,193.2,192.68,191.77,191.55,190.9,190.24,189.15,191.14,189.79,189.49,189.08,188.09,187.88,189.2,188.72,188.8,188.73,188.54,189.01,191.22,190.77,190.45,188.86,185.4,184.69,184.81,185.38,185.14,185.57,185.74,187.05,187.21,185.82,185.79,184.81,185.5,187.46,187.3,187.71,186.7,186.84,186.43,185.65,185.8,186.42,187.44,188.46,187.09,187.87,189.06,189.73,190.61,192.56,192.12,190.48,189.12,188.44,188.45,189.53,189.78,190.31,189.18,187.47,186.18,188.39,188.51,190.2,190.55,190.49,187.88,188.23,186.71,185.47,184.14,183.78,185.04,190.96,188.36,189.65,188.78,190.36,191.37,190.29,188.37,187.26,187.11,185.81,186.05,186.8,185.44,184.49,183.5,183.6,184.02,186.24,187.1,188.74,187.58,190.84,188.96,192.44,192.76,192.16,194.55,194.05,196.4,196.22,194.34,194.65,192.09,191.89,192.8,191.74,191.35,191.64,190.13,189.93,191.88,192.73,193.78,193.52,193.03,192.45,197.47,202.48,202.39,203.15,194.92,198.13,196.3,196.01,195.53,197.18,197.31,198.54,197.14,196.32,194.31,193.37,193.59,193.57,194.07,193.52,192.21,192.45,192.26,191.6,191.22,191.09,188.75,186.57,185.54,185.07,185.01,185.13,185.47,186.72,186.57,186.62,185.09,185.75,184.61,185.78,184.67,183.62,183.65,184.12,183.29,182.91,182.22,181.91,181.05,181.74,180.77,180.94,180.5,180.58,180.47,179.67,177.88,176.92,176.5,175.84,176.65,175.07,174.23,175.09,174.93,174.16,173.29,173.05,173.21,172.24,171.84,171.56,172.04,172.01,172.95,171.51,170.78,170.69,170.1,169.97,169.57,170.08,171.58,169.56,170.19,169.82,169.58,168.87,169.48,168.33,168.38,168.34,169.21,168.85,170.71,170.52,170.8,168.66,168.39,167.47,167.27,167.29,168.55,169.4,169.53,168.64,170.19,169.45,168.14,166.12,165.64,165.59,165.1,165.51,166.42,164.9,164.62,162.66,163.62,164.54,164.18,163.43,162.5,161.57,161.74,161.68,161.26,160.98,161.25,160.28,159.95,163.07,160.26,162.52,162.27,161.8,161.85,160.56,162.55,163.04,162.08,160.15,159.11,157.05,155.84,156.56,156.77]},{"panel":0,"label":"SPY","color":"var(--chart-grey, #a3a19c)","kind":"line","x":["2024-01-02","2024-01-03","2024-01-04","2024-01-05","2024-01-08","2024-01-09","2024-01-10","2024-01-11","2024-01-12","2024-01-16","2024-01-17","2024-01-18","2024-01-19","2024-01-22","2024-01-23","2024-01-24","2024-01-25","2024-01-26","2024-01-29","2024-01-30","2024-01-31","2024-02-01","2024-02-02","2024-02-05","2024-02-06","2024-02-07","2024-02-08","2024-02-09","2024-02-12","2024-02-13","2024-02-14","2024-02-15","2024-02-16","2024-02-20","2024-02-21","2024-02-22","2024-02-23","2024-02-26","2024-02-27","2024-02-28","2024-02-29","2024-03-01","2024-03-04","2024-03-05","2024-03-06","2024-03-07","2024-03-08","2024-03-11","2024-03-12","2024-03-13","2024-03-14","2024-03-15","2024-03-18","2024-03-19","2024-03-20","2024-03-21","2024-03-22","2024-03-25","2024-03-26","2024-03-27","2024-03-28","2024-04-01","2024-04-02","2024-04-03","2024-04-04","2024-04-05","2024-04-08","2024-04-09","2024-04-10","2024-04-11","2024-04-12","2024-04-15","2024-04-16","2024-04-17","2024-04-18","2024-04-19","2024-04-22","2024-04-23","2024-04-24","2024-04-25","2024-04-26","2024-04-29","2024-04-30","2024-05-01","2024-05-02","2024-05-03","2024-05-06","2024-05-07","2024-05-08","2024-05-09","2024-05-10","2024-05-13","2024-05-14","2024-05-15","2024-05-16","2024-05-17","2024-05-20","2024-05-21","2024-05-22","2024-05-23","2024-05-24","2024-05-28","2024-05-29","2024-05-30","2024-05-31","2024-06-03","2024-06-04","2024-06-05","2024-06-06","2024-06-07","2024-06-10","2024-06-11","2024-06-12","2024-06-13","2024-06-14","2024-06-17","2024-06-18","2024-06-20","2024-06-21","2024-06-24","2024-06-25","2024-06-26","2024-06-27","2024-06-28","2024-07-01","2024-07-02","2024-07-03","2024-07-05","2024-07-08","2024-07-09","2024-07-10","2024-07-11","2024-07-12","2024-07-15","2024-07-16","2024-07-17","2024-07-18","2024-07-19","2024-07-22","2024-07-23","2024-07-24","2024-07-25","2024-07-26","2024-07-29","2024-07-30","2024-07-31","2024-08-01","2024-08-02","2024-08-05","2024-08-06","2024-08-07","2024-08-08","2024-08-09","2024-08-12","2024-08-13","2024-08-14","2024-08-15","2024-08-16","2024-08-19","2024-08-20","2024-08-21","2024-08-22","2024-08-23","2024-08-26","2024-08-27","2024-08-28","2024-08-29","2024-08-30","2024-09-03","2024-09-04","2024-09-05","2024-09-06","2024-09-09","2024-09-10","2024-09-11","2024-09-12","2024-09-13","2024-09-16","2024-09-17","2024-09-18","2024-09-19","2024-09-20","2024-09-23","2024-09-24","2024-09-25","2024-09-26","2024-09-27","2024-09-30","2024-10-01","2024-10-02","2024-10-03","2024-10-04","2024-10-07","2024-10-08","2024-10-09","2024-10-10","2024-10-11","2024-10-14","2024-10-15","2024-10-16","2024-10-17","2024-10-18","2024-10-21","2024-10-22","2024-10-23","2024-10-24","2024-10-25","2024-10-28","2024-10-29","2024-10-30","2024-10-31","2024-11-01","2024-11-04","2024-11-05","2024-11-06","2024-11-07","2024-11-08","2024-11-11","2024-11-12","2024-11-13","2024-11-14","2024-11-15","2024-11-18","2024-11-19","2024-11-20","2024-11-21","2024-11-22","2024-11-25","2024-11-26","2024-11-27","2024-11-29","2024-12-02","2024-12-03","2024-12-04","2024-12-05","2024-12-06","2024-12-09","2024-12-10","2024-12-11","2024-12-12","2024-12-13","2024-12-16","2024-12-17","2024-12-18","2024-12-19","2024-12-20","2024-12-23","2024-12-24","2024-12-26","2024-12-27","2024-12-30","2024-12-31","2025-01-02","2025-01-03","2025-01-06","2025-01-07","2025-01-08","2025-01-10","2025-01-13","2025-01-14","2025-01-15","2025-01-16","2025-01-17","2025-01-21","2025-01-22","2025-01-23","2025-01-24","2025-01-27","2025-01-28","2025-01-29","2025-01-30","2025-01-31","2025-02-03","2025-02-04","2025-02-05","2025-02-06","2025-02-07","2025-02-10","2025-02-11","2025-02-12","2025-02-13","2025-02-14","2025-02-18","2025-02-19","2025-02-20","2025-02-21","2025-02-24","2025-02-25","2025-02-26","2025-02-27","2025-02-28","2025-03-03","2025-03-04","2025-03-05","2025-03-06","2025-03-07","2025-03-10","2025-03-11","2025-03-12","2025-03-13","2025-03-14","2025-03-17","2025-03-18","2025-03-19","2025-03-20","2025-03-21","2025-03-24","2025-03-25","2025-03-26","2025-03-27","2025-03-28","2025-03-31","2025-04-01","2025-04-02","2025-04-03","2025-04-04","2025-04-07","2025-04-08","2025-04-09","2025-04-10","2025-04-11","2025-04-14","2025-04-15","2025-04-16","2025-04-17","2025-04-21","2025-04-22","2025-04-23","2025-04-24","2025-04-25","2025-04-28","2025-04-29","2025-04-30","2025-05-01","2025-05-02","2025-05-05","2025-05-06","2025-05-07","2025-05-08","2025-05-09","2025-05-12","2025-05-13","2025-05-14","2025-05-15","2025-05-16","2025-05-19","2025-05-20","2025-05-21","2025-05-22","2025-05-23","2025-05-27","2025-05-28","2025-05-29","2025-05-30","2025-06-02","2025-06-03","2025-06-04","2025-06-05","2025-06-06","2025-06-09","2025-06-10","2025-06-11","2025-06-12","2025-06-13","2025-06-16","2025-06-17","2025-06-18","2025-06-20","2025-06-23","2025-06-24","2025-06-25","2025-06-26","2025-06-27","2025-06-30","2025-07-01","2025-07-02","2025-07-03","2025-07-07","2025-07-08","2025-07-09","2025-07-10","2025-07-11","2025-07-14","2025-07-15","2025-07-16","2025-07-17","2025-07-18","2025-07-21","2025-07-22","2025-07-23","2025-07-24","2025-07-25","2025-07-28","2025-07-29","2025-07-30","2025-07-31","2025-08-01","2025-08-04","2025-08-05","2025-08-06","2025-08-07","2025-08-08","2025-08-11","2025-08-12","2025-08-13","2025-08-14","2025-08-15","2025-08-18","2025-08-19","2025-08-20","2025-08-21","2025-08-22","2025-08-25","2025-08-26","2025-08-27","2025-08-28","2025-08-29","2025-09-02","2025-09-03","2025-09-04","2025-09-05","2025-09-08","2025-09-09","2025-09-10","2025-09-11","2025-09-12","2025-09-15","2025-09-16","2025-09-17","2025-09-18","2025-09-19","2025-09-22","2025-09-23","2025-09-24","2025-09-25","2025-09-26","2025-09-29","2025-09-30","2025-10-01","2025-10-02","2025-10-03","2025-10-06","2025-10-07","2025-10-08","2025-10-09","2025-10-10","2025-10-13","2025-10-14","2025-10-15","2025-10-16","2025-10-17","2025-10-20","2025-10-21","2025-10-22","2025-10-23","2025-10-24","2025-10-27","2025-10-28","2025-10-29","2025-10-30","2025-10-31"],"y":[1.0,0.991833,0.988638,0.989992,1.00413,1.0026,1.00827,1.00783,1.00853,1.00482,0.999238,1.00812,1.02069,1.02285,1.02583,1.02695,1.03254,1.03123,1.03939,1.03859,1.02164,1.03502,1.04591,1.0421,1.04513,1.05385,1.05431,1.0604,1.05994,1.04534,1.05484,1.06212,1.05683,1.05101,1.05196,1.07373,1.07447,1.07054,1.07253,1.07111,1.07496,1.08505,1.08389,1.07306,1.07849,1.0892,1.08266,1.08173,1.09337,1.09165,1.0895,1.08201,1.08844,1.09449,1.10462,1.10827,1.10617,1.10311,1.10107,1.11033,1.11011,1.10818,1.10114,1.10235,1.08889,1.10027,1.10088,1.10215,1.09112,1.09935,1.08418,1.0706,1.06864,1.06232,1.06013,1.05088,1.06056,1.07314,1.07263,1.06856,1.07868,1.0825,1.06535,1.06189,1.07183,1.08511,1.09632,1.09753,1.09763,1.10396,1.10538,1.10553,1.1106,1.12435,1.12204,1.12365,1.12495,1.12771,1.12446,1.11625,1.12363,1.12442,1.11654,1.10914,1.11924,1.12015,1.1214,1.13473,1.13471,1.13333,1.13683,1.13957,1.14893,1.15124,1.15194,1.16111,1.16406,1.1609,1.15934,1.15557,1.16003,1.16147,1.1633,1.15873,1.16111,1.16893,1.17414,1.18091,1.18227,1.18342,1.19513,1.18483,1.1923,1.19558,1.20267,1.18581,1.1767,1.16888,1.18093,1.17908,1.15236,1.14636,1.15919,1.15988,1.154,1.17276,1.15615,1.13462,1.10158,1.11174,1.10431,1.12983,1.13482,1.13541,1.15408,1.15773,1.17757,1.18021,1.19149,1.18956,1.19364,1.18428,1.19686,1.19401,1.19565,1.1887,1.18881,1.20016,1.17546,1.17306,1.1702,1.15051,1.16339,1.16846,1.18044,1.19039,1.1966,1.19837,1.19886,1.19531,1.2157,1.2136,1.21663,1.22011,1.21742,1.22225,1.22048,1.22537,1.21439,1.2149,1.21268,1.2237,1.21264,1.22411,1.23259,1.23043,1.2378,1.24792,1.23823,1.24361,1.24371,1.2485,1.24645,1.24579,1.2344,1.23707,1.23664,1.24047,1.24248,1.23872,1.21443,1.21956,1.21693,1.23165,1.26227,1.27203,1.27754,1.27876,1.27479,1.27541,1.26721,1.25098,1.2561,1.26069,1.26112,1.26789,1.27182,1.27613,1.2828,1.27891,1.28685,1.28916,1.28976,1.29777,1.29563,1.29809,1.2914,1.28739,1.29734,1.29066,1.2904,1.29591,1.29057,1.25211,1.25172,1.26676,1.27434,1.28851,1.28859,1.27503,1.26048,1.25589,1.25281,1.26847,1.27578,1.26136,1.2632,1.24391,1.24584,1.24756,1.27025,1.26781,1.28054,1.29226,1.29952,1.30661,1.3028,1.28437,1.29541,1.2896,1.29652,1.28962,1.28094,1.28954,1.29476,1.29926,1.28737,1.29611,1.2971,1.29292,1.30657,1.30651,1.31034,1.31343,1.30796,1.28559,1.27974,1.27338,1.27402,1.25369,1.27325,1.25094,1.23614,1.24942,1.22724,1.23412,1.20125,1.19126,1.19759,1.18162,1.20603,1.21533,1.20219,1.21529,1.21177,1.21217,1.23388,1.23685,1.22208,1.21883,1.19429,1.20231,1.2057,1.21333,1.15354,1.08601,1.08407,1.06709,1.17916,1.12749,1.14761,1.15874,1.15549,1.12981,1.13142,1.10449,1.13323,1.15079,1.17501,1.1835,1.18395,1.19141,1.19188,1.20033,1.21815,1.21116,1.20104,1.20609,1.21449,1.21294,1.25303,1.2613,1.26292,1.26908,1.27712,1.27852,1.27422,1.25275,1.25324,1.24469,1.27057,1.26322,1.2682,1.26679,1.27392,1.28119,1.28084,1.27465,1.28774,1.2889,1.29621,1.29251,1.29765,1.28314,1.29535,1.28428,1.28409,1.28107,1.29372,1.30802,1.30875,1.31899,1.32554,1.33188,1.33145,1.33749,1.34803,1.33798,1.33725,1.34527,1.34906,1.34432,1.34688,1.34113,1.34561,1.35385,1.35285,1.35542,1.35561,1.36715,1.3676,1.37338,1.37303,1.36941,1.36769,1.36256,1.34022,1.36059,1.3537,1.36406,1.36292,1.37355,1.37083,1.38543,1.39017,1.3903,1.38704,1.38674,1.37922,1.37555,1.37004,1.39107,1.38495,1.39075,1.39392,1.39886,1.39051,1.38021,1.38769,1.39929,1.39524,1.39866,1.4019,1.40595,1.41763,1.41716,1.4247,1.42274,1.42097,1.42761,1.43468,1.44147,1.43363,1.42906,1.42247,1.43062,1.43464,1.44005,1.44495,1.44662,1.4466,1.45178,1.4464,1.45503,1.45081,1.4116,1.43326,1.43151,1.43786,1.42807,1.43618,1.45111,1.45109,1.44355,1.45211,1.46397,1.48125,1.48518,1.48589,1.46955,1.47437],"sx":[70.1,70.8,71.51,72.22,74.33,75.04,75.75,76.45,77.16,79.98,80.69,81.39,82.1,84.22,84.92,85.63,86.33,87.04,89.16,89.86,90.57,91.27,91.98,94.1,94.8,95.51,96.22,96.92,99.04,99.75,100.45,101.16,101.86,104.69,105.39,106.1,106.8,108.92,109.63,110.33,111.04,111.75,113.86,114.57,115.27,115.98,116.69,118.8,119.51,120.22,120.92,121.63,123.75,124.45,125.16,125.86,126.57,128.69,129.39,130.1,130.8,133.63,134.33,135.04,135.75,136.45,138.57,139.27,139.98,140.69,141.39,143.51,144.22,144.92,145.63,146.33,148.45,149.16,149.86,150.57,151.27,153.39,154.1,154.8,155.51,156.22,158.33,159.04,159.74,160.45,161.16,163.27,163.98,164.69,165.39,166.1,168.22,168.92,169.63,170.33,171.04,173.86,174.57,175.27,175.98,178.1,178.8,179.51,180.22,180.92,183.04,183.74,184.45,185.16,185.86,187.98,188.69,190.1,190.8,192.92,193.63,194.33,195.04,195.74,197.86,198.57,199.27,200.69,202.8,203.51,204.22,204.92,205.63,207.74,208.45,209.16,209.86,210.57,212.69,213.39,214.1,214.8,215.51,217.63,218.33,219.04,219.74,220.45,222.57,223.27,223.98,224.69,225.39,227.51,228.21,228.92,229.63,230.33,232.45,233.16,233.86,234.57,235.27,237.39,238.1,238.8,239.51,240.21,243.04,243.74,244.45,245.16,247.27,247.98,248.69,249.39,250.1,252.21,252.92,253.63,254.33,255.04,257.16,257.86,258.57,259.27,259.98,262.1,262.8,263.51,264.21,264.92,267.04,267.74,268.45,269.16,269.86,271.98,272.69,273.39,274.1,274.8,276.92,277.63,278.33,279.04,279.74,281.86,282.57,283.27,283.98,284.68,286.8,287.51,288.21,288.92,289.63,291.74,292.45,293.16,293.86,294.57,296.68,297.39,298.1,298.8,299.51,301.63,302.33,303.04,304.45,306.57,307.27,307.98,308.68,309.39,311.51,312.21,312.92,313.63,314.33,316.45,317.16,317.86,318.57,319.27,321.39,322.1,323.51,324.21,326.33,327.04,328.45,329.16,331.27,331.98,332.68,334.1,336.21,336.92,337.63,338.33,339.04,341.86,342.57,343.27,343.98,346.1,346.8,347.51,348.21,348.92,351.04,351.74,352.45,353.15,353.86,355.98,356.68,357.39,358.1,358.8,361.63,362.33,363.04,363.74,365.86,366.57,367.27,367.98,368.68,370.8,371.51,372.21,372.92,373.63,375.74,376.45,377.15,377.86,378.57,380.68,381.39,382.1,382.8,383.51,385.63,386.33,387.04,387.74,388.45,390.57,391.27,391.98,392.68,393.39,395.51,396.21,396.92,397.63,398.33,400.45,401.15,401.86,402.57,405.39,406.1,406.8,407.51,408.21,410.33,411.04,411.74,412.45,413.15,415.27,415.98,416.68,417.39,418.1,420.21,420.92,421.62,422.33,423.04,425.15,425.86,426.57,427.27,427.98,430.8,431.51,432.21,432.92,435.04,435.74,436.45,437.15,437.86,439.98,440.68,441.39,442.1,442.8,444.92,445.62,446.33,447.74,449.86,450.57,451.27,451.98,452.68,454.8,455.51,456.21,456.92,459.74,460.45,461.15,461.86,462.57,464.68,465.39,466.1,466.8,467.51,469.62,470.33,471.04,471.74,472.45,474.57,475.27,475.98,476.68,477.39,479.51,480.21,480.92,481.62,482.33,484.45,485.15,485.86,486.57,487.27,489.39,490.09,490.8,491.51,492.21,494.33,495.04,495.74,496.45,497.15,499.98,500.68,501.39,502.09,504.21,504.92,505.62,506.33,507.04,509.15,509.86,510.57,511.27,511.98,514.09,514.8,515.51,516.21,516.92,519.04,519.74,520.45,521.15,521.86,523.98,524.68,525.39,526.09,526.8,528.92,529.62,530.33,531.04,531.74,533.86,534.56,535.27,535.98,536.68,538.8,539.51,540.21,540.92,541.62],"sy":[222.85,223.3,223.48,223.41,222.62,222.7,222.39,222.41,222.37,222.58,222.89,222.39,221.69,221.57,221.4,221.34,221.03,221.1,220.65,220.69,221.64,220.89,220.28,220.5,220.33,219.84,219.81,219.47,219.5,220.31,219.78,219.38,219.67,220.0,219.94,218.73,218.69,218.91,218.8,218.87,218.66,218.1,218.16,218.77,218.46,217.86,218.23,218.28,217.63,217.73,217.85,218.27,217.91,217.57,217.0,216.8,216.92,217.09,217.2,216.68,216.7,216.8,217.2,217.13,217.88,217.25,217.21,217.14,217.76,217.3,218.14,218.9,219.01,219.37,219.49,220.01,219.46,218.76,218.79,219.02,218.45,218.24,219.2,219.39,218.83,218.09,217.47,217.4,217.39,217.04,216.96,216.95,216.67,215.9,216.03,215.94,215.87,215.71,215.89,216.35,215.94,215.9,216.34,216.75,216.19,216.13,216.06,215.32,215.32,215.4,215.2,215.05,214.53,214.4,214.36,213.85,213.68,213.86,213.94,214.15,213.91,213.83,213.72,213.98,213.85,213.41,213.12,212.74,212.66,212.6,211.94,212.52,212.1,211.92,211.52,212.47,212.97,213.41,212.74,212.84,214.33,214.67,213.95,213.91,214.24,213.19,214.12,215.33,217.17,216.6,217.02,215.59,215.31,215.28,214.24,214.03,212.93,212.78,212.15,212.26,212.03,212.55,211.85,212.01,211.92,212.3,212.3,211.66,213.04,213.18,213.34,214.44,213.72,213.43,212.77,212.21,211.86,211.76,211.74,211.93,210.79,210.91,210.74,210.55,210.7,210.43,210.53,210.25,210.87,210.84,210.96,210.35,210.97,210.32,209.85,209.97,209.56,208.99,209.54,209.24,209.23,208.96,209.08,209.11,209.75,209.6,209.62,209.41,209.3,209.51,210.87,210.58,210.73,209.9,208.19,207.65,207.34,207.27,207.49,207.46,207.92,208.82,208.54,208.28,208.26,207.88,207.66,207.42,207.05,207.26,206.82,206.69,206.66,206.21,206.33,206.19,206.56,206.79,206.23,206.61,206.62,206.31,206.61,208.76,208.78,207.94,207.52,206.73,206.72,207.48,208.29,208.55,208.72,207.85,207.44,208.24,208.14,209.22,209.11,209.01,207.75,207.88,207.17,206.52,206.11,205.71,205.93,206.96,206.34,206.67,206.28,206.66,207.15,206.67,206.38,206.13,206.79,206.3,206.25,206.48,205.72,205.72,205.51,205.33,205.64,206.89,207.22,207.57,207.54,208.67,207.58,208.83,209.65,208.91,210.15,209.77,211.6,212.16,211.81,212.7,211.34,210.82,211.55,210.82,211.01,210.99,209.78,209.61,210.44,210.62,211.99,211.54,211.35,210.93,214.27,218.04,218.15,219.1,212.84,215.72,214.6,213.98,214.16,215.59,215.5,217.01,215.4,214.42,213.07,212.59,212.57,212.15,212.13,211.65,210.66,211.05,211.61,211.33,210.86,210.95,208.71,208.25,208.16,207.81,207.36,207.28,207.52,208.72,208.7,209.17,207.73,208.14,207.86,207.94,207.54,207.14,207.15,207.5,206.77,206.7,206.3,206.5,206.22,207.03,206.34,206.96,206.97,207.14,206.43,205.64,205.6,205.02,204.66,204.3,204.33,203.99,203.4,203.96,204.0,203.55,203.34,203.61,203.46,203.79,203.54,203.07,203.13,202.99,202.98,202.33,202.31,201.98,202.0,202.21,202.3,202.59,203.84,202.7,203.08,202.5,202.57,201.97,202.13,201.31,201.05,201.04,201.22,201.24,201.66,201.86,202.17,200.99,201.34,201.01,200.84,200.56,201.03,201.6,201.18,200.54,200.76,200.57,200.39,200.16,199.51,199.54,199.12,199.23,199.32,198.95,198.56,198.18,198.62,198.87,199.24,198.78,198.56,198.26,197.98,197.89,197.89,197.6,197.9,197.42,197.66,199.85,198.64,198.74,198.38,198.93,198.47,197.64,197.64,198.06,197.58,196.92,195.96,195.74,195.7,196.61,196.34]}]} 2026-10-31T01:55:50.711773 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 2024-01 2024-04 2024-07 2024-10 2025-01 2025-04 2025-07 2025-10 Date 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Value of 1 dollar invested at the start of 2024 Weights chosen on 2020 to 2023, then run on 2024 to 2025, against equal weights Sharpe-maximising weights from 2020 to 2023 equal weights, 20% each SPY
Figure 2. The 2020 to 2023 weights run on 2024 to 2025 against equal weights and SPY

Why real optimisers disappoint

The maths is exact. The inputs are not. Expected returns are very hard to estimate: a few years of data tell you almost nothing reliable about a stock’s average return. NVDA’s 74.9% a year is what happened in 2020 to 2025, not what anyone could have forecast in 2019, and nobody should expect it to repeat. And the optimiser takes your guesses completely literally.

I changed one input at a time: first GLD expected to return 12.5% instead of 17.5%, still a sound hedge; then, separately, NVDA 69.9% instead of 74.9%, still far ahead of everything else. Everything else the same (Table 5).

Table 5. The best mix before and after cutting one expected return by five points
ItemSPYNVDAGSXOMGLD
Original best mix0%29%7%4%60%
After −5 points on GLD0%37%13%4%46%
After −5 points on NVDA0%22%13%1%63%

Five points off GLD moved 14 points of the money out of gold, most of it into NVDA and the rest into GS. Five points off NVDA, whose estimate is still four times anyone else’s, moved a quarter of its slot into gold and GS. No slot is safe. Optimisers concentrate money in whatever assets have the most optimistic estimates, which are often the ones with the biggest estimation errors. Richard Michaud called mean-variance optimisers “error maximizers”.

What practitioners do about it:

  • Prefer minimum variance, which doesn’t need expected returns at all.
  • Add limits: no asset above some maximum, or close to a benchmark.
  • Shrink estimates towards something sensible, like equal returns, before optimising.
  • Check stability: if a small change to the inputs flips the answer, don’t trust the answer.

The code

This only scores random portfolios; it doesn’t search for the best one. It reads the blog’s price file from the examples repo, so it runs as pasted (pip install numpy pandas). mu holds the five expected yearly returns and cov the yearly covariance matrix; W holds 50,000 random mixes, one row per mix and one column per ticker.

import numpy as np
import pandas as pd

URL = "https://raw.githubusercontent.com/ankurtrapasiya/examples/main/data/prices.csv"
prices = pd.read_csv(URL, index_col="date", parse_dates=True)   # SPY, NVDA, GS, XOM, GLD
r = (prices / prices.shift(1) - 1).dropna()     # daily returns
mu = (r.mean() * 252).to_numpy()                # expected yearly returns (the 2020 to 2025 averages)
cov = (r.cov() * 252).to_numpy()                # yearly covariance matrix

W = np.random.default_rng(17).dirichlet(np.ones(5), 50_000)   # 50,000 random long-only weights
ret = W @ mu                                                  # each portfolio's return
risk = np.sqrt(np.einsum("ij,jk,ik->i", W, cov, W))           # sqrt(w' cov w) for each row
sharpe = (ret - 0.02) / risk                                  # 2% risk-free rate
best, safest = sharpe.argmax(), risk.argmin()
mix = lambda w: {t: round(float(x), 2) for t, x in zip(prices.columns, w)}  # ticker -> weight
print(mix(W[best]), f"Sharpe {sharpe[best]:.3f}, return {ret[best]:.1%}, risk {risk[best]:.1%}")
print(mix(W[safest]), f"risk {risk[safest]:.1%}")

It prints the best mix (60% GLD, 29% NVDA, 7% GS, 4% XOM) with its Sharpe of about 1.61, return 34.7% and risk 20.3%, then the lowest-risk mix (59% GLD, 36% SPY, 4% XOM) at 13.6%, then the two nudged mixes of Table 5. dirichlet draws random weights that are never negative and always add up to 1. einsum("ij,jk,ik->i", ...) computes w⊤Σww^\top \Sigma w for every row of W at once.

The script behind all the numbers

The frontier chart and tables come from examples/portfolio-optimisation/random_portfolios.py. To run it, save it next to the shared helpers market_data.py and chartstyle.py and the price file data/prices.csv, keeping the folders as in the links, then run uv run examples/portfolio-optimisation/random_portfolios.py.

Summary

Table 6 collects the formulas.

Table 6. Formulas worth remembering
IdeaFormulaRemember it as
Portfolio returnw⊤μ\key{w^\top} \good{\mu}weighted average
Portfolio riskw⊤Σw\sqrt{\key{w^\top} \risk{\Sigma} \key{w}}correlations decide how much cancels
Efficient frontierbest return for each level of riskthe upper-left edge of the cloud
Minimum varianceΣ−11/1⊤Σ−11\risk{\Sigma^{-1}}\mathbf{1} / \mathbf{1}^\top\risk{\Sigma^{-1}}\mathbf{1} (shorts allowed)needs no return forecasts
Max Sharpemax (w⊤μ−rf)/w⊤Σw(\key{w^\top}\good{\mu} - r_f)/\sqrt{\key{w^\top}\risk{\Sigma} \key{w}}where the line from cash touches the cloud
Capital market linerf+Sharpe×σr_f + \text{Sharpe} \times \risk{\sigma}one risky mix, plus or minus cash
The catchoutputs swing with small input changesbad forecasts in, confident nonsense out

The series map puts the series’ ten ideas on one page.

References

Tagged statistics, finance, portfolio, risk← Home