Portfolio optimisation is how you decide how much money to put in each asset. This post
explores the idea by drawing thousands of random portfolios, which 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 2019 to 2023 figures from the earlier posts, annualised, with a 2% risk-free
rate:
Ticker Expected return Standard deviation Sharpe SPY 16.7% 21.0% 0.70 AAPL 37.8% 32.2% 1.11 JPM 18.9% 31.9% 0.53 XOM 18.2% 34.3% 0.47 GLD 10.2% 14.9% 0.55
The stocks move together (correlations 0.3 to 0.8, from the
correlation post ). Gold is nearly unrelated to
the rest (0.1 or less). Keep one thing in mind throughout: “expected return” here means “what
happened in those five years”, which is the standard shortcut and, as the end of the post shows,
the weak point.
For weights w \key{w} w (one per asset, adding up to 1), expected returns μ \good{\mu} μ and covariance matrix
Σ \risk{\Sigma} Σ . Romero and Balch’s What Hedge Funds Really Do (chapter 10) writes these as
r p = ∑ i w i r i \good{r_p} = \sum_i \key{w_i} \good{r_i} r p = ∑ i w i r i and σ p 2 = ∑ i ∑ j w i w j σ i σ j ρ i j \risk{\sigma_p^2} = \sum_i \sum_j \key{w_i} \key{w_j} \risk{\sigma_i} \risk{\sigma_j} \rho_{ij} σ p 2 = ∑ i ∑ j w i w j σ i σ j ρ ij ; in vector form:
the weights we choose returns risk
expected return: μ p = w ⊤ μ \text{expected return: } \good{\mu_p} = \key{w^\top} \good{\mu} expected return: μ p = w ⊤ μ
risk: σ p = w ⊤ Σ w \text{risk: } \risk{\sigma_p} = \sqrt{\key{w^\top} \risk{\Sigma}\, \key{w}} risk: σ p = w ⊤ Σ 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:
{"panels":[{"x0":43.64,"x1":563.36,"y0":29.16,"y1":275.68,"title":"50,000 random mixes of five tickers, 2019\u20132023 (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)","x":[0.0,36.0],"y":[2.0,45.368],"sx":[43.64,563.36],"sy":[296.81,-8.65]},{"panel":0,"label":"best Sharpe found","color":"#7d7b77","x":[19.3136],"y":[25.2664],"sx":[322.47],"sy":[132.93]},{"panel":0,"label":"lowest risk found","color":"var(--chart-blue, #3b6ea5)","x":[12.7282],"y":[12.4312],"sx":[227.4],"sy":[223.34]}]}
2026-10-15T18:29:09.101130
image/svg+xml
Matplotlib v3.11.2, https://matplotlib.org/
0
5
10
15
20
25
30
35
Risk: standard deviation of yearly return (% a year)
5
10
15
20
25
30
35
40
Expected return (% a year)
SPY
AAPL
JPM
XOM
GLD
50,000 random mixes of five tickers, 2019–2023 (redder = higher Sharpe ratio)
best Sharpe found
lowest risk found
capital market line (cash + best mix)
Three things to notice:
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.
The lowest-risk mix (blue) has 12.7% risk, less than gold alone (14.9%). Adding some SPY
and a little JPM to gold lowers risk, because they don’t move together.
The best mix beats every single asset on Sharpe ratio. The best of the 50,000 has a Sharpe of
1.20 \key{1.20} 1.20 , higher than AAPL alone (1.11), the best single asset.
Portfolio Return Risk Sharpe Mix Best Sharpe found 25.3% 19.3% 1.20 53% AAPL, 42% GLD, 5% XOM, nothing in SPY or JPM Lowest risk found 12.4% 12.7% 0.82 70% GLD, 22% SPY, 7% JPM Equal weights 20.4% 19.8% 0.93 20% each
Notice what the best mix is: the stock with the best past return plus the asset that moves
independently of it. Nothing in SPY, even though SPY is “the market”: it’s just a worse version
of AAPL in these years, and AAPL 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^* r ∗ , fully invested:
minimise w σ p ( w ) subject to r p ( w ) ≥ r ∗ , ∑ i w i = 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^*,\; \textstyle\sum_i \key{w_i} = 1
\end{array} w minimise subject to σ p ( w ) r p ( w ) ≥ r ∗ , ∑ i w i = 1
Solve it once for every possible target r ∗ 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.
minimise w w ⊤ Σ w subject to ∑ i w i = 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} w minimise subject to w ⊤ Σ w ∑ i w i = 1
If short selling is allowed (weights can be negative), this has an exact answer:
w min var = Σ − 1 1 1 ⊤ Σ − 1 1 \key{w_{\text{min var}}} = \frac{\risk{\Sigma^{-1}} \mathbf{1}}{\mathbf{1}^\top \risk{\Sigma^{-1}} \mathbf{1}} w min var = 1 ⊤ Σ − 1 1 Σ − 1 1
where 1 \mathbf{1} 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.
maximise w w ⊤ μ − r f w ⊤ Σ w subject to ∑ i w i = 1 , w i ≥ 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,\; \key{w_i} \ge 0
\end{array} w maximise subject to w ⊤ Σ w w ⊤ μ − r f ∑ i w i = 1 , w i ≥ 0
Without the long-only limit, the answer points in the direction Σ − 1 ( μ − r f 1 ) \risk{\Sigma^{-1}}(\good{\mu} - r_f \mathbf{1}) Σ − 1 ( μ − r f 1 ) ,
rescaled so the weights add up to 1. With limits like w i ≥ 0 \key{w_i} \ge 0 w i ≥ 0 there’s no neat formula, and you
need a numerical optimiser.
The capital market line
The dashed line on the chart 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 ] = r f + Sharpe best × σ \good{E[R]} = r_f + \text{Sharpe}_{\text{best}} \times \risk{\sigma} E [ R ] = r f + Sharpe best × σ
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:
Part For maximum Sharpe Why it is there Decision variables one weight per asset the thing being chosen Objective the negative of the annualised Sharpe ratio a minimiser maximises by minimising the negative Constraints weights add up to 1 fully invested Bounds each weight between 0 and 1 long only, no leverage Search procedure SciPy’s SLSQP, a gradient-based local search from equal weights it 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 most robust; 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
year and then held through the following year, against the 20%-each portfolio:
Chosen on Weights it chose Sharpe, same period Sharpe, next period Equal weights, next period 2019 57% GLD, 25% JPM, 18% AAPL 3.82 1.17 0.61 2020 64% GLD, 36% AAPL 1.70 0.76 1.91 2021 80% SPY, 14% XOM, 5% AAPL 2.24 −0.10 0.29 2022 100% XOM 1.88 0.00 \bad{0.00} 0.00 1.93 2019 to 2021 58% GLD, 42% AAPL 1.76 0.42 0.64
In 2022, the one year where a single asset had a strongly positive Sharpe (XOM at 1.88 while SPY
and AAPL 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 +24.0%. In every window the in-sample Sharpe at least halved out of sample. Equal weights
won four of the five.
{"panels":[{"x0":46.52,"x1":564.73,"y0":29.16,"y1":206.21,"title":"Weights chosen on 2019 to 2021, then run on 2022 to 2023, against equal weights","xlabel":"Date","ylabel":"Value of 1 dollar invested at the start of 2022","xlog":false}],"series":[{"panel":0,"label":"Sharpe-maximising weights from 2019 to 2021","color":"var(--chart-maroon, #b6262c)","x":["2022-01-03","2022-01-04","2022-01-05","2022-01-06","2022-01-07","2022-01-10","2022-01-11","2022-01-12","2022-01-13","2022-01-14","2022-01-18","2022-01-19","2022-01-20","2022-01-21","2022-01-24","2022-01-25","2022-01-26","2022-01-27","2022-01-28","2022-01-31","2022-02-01","2022-02-02","2022-02-03","2022-02-04","2022-02-07","2022-02-08","2022-02-09","2022-02-10","2022-02-11","2022-02-14","2022-02-15","2022-02-16","2022-02-17","2022-02-18","2022-02-22","2022-02-23","2022-02-24","2022-02-25","2022-02-28","2022-03-01","2022-03-02","2022-03-03","2022-03-04","2022-03-07","2022-03-08","2022-03-09","2022-03-10","2022-03-11","2022-03-14","2022-03-15","2022-03-16","2022-03-17","2022-03-18","2022-03-21","2022-03-22","2022-03-23","2022-03-24","2022-03-25","2022-03-28","2022-03-29","2022-03-30","2022-03-31","2022-04-01","2022-04-04","2022-04-05","2022-04-06","2022-04-07","2022-04-08","2022-04-11","2022-04-12","2022-04-13","2022-04-14","2022-04-18","2022-04-19","2022-04-20","2022-04-21","2022-04-22","2022-04-25","2022-04-26","2022-04-27","2022-04-28","2022-04-29","2022-05-02","2022-05-03","2022-05-04","2022-05-05","2022-05-06","2022-05-09","2022-05-10","2022-05-11","2022-05-12","2022-05-13","2022-05-16","2022-05-17","2022-05-18","2022-05-19","2022-05-20","2022-05-23","2022-05-24","2022-05-25","2022-05-26","2022-05-27","2022-05-31","2022-06-01","2022-06-02","2022-06-03","2022-06-06","2022-06-07","2022-06-08","2022-06-09","2022-06-10","2022-06-13","2022-06-14","2022-06-15","2022-06-16","2022-06-17","2022-06-21","2022-06-22","2022-06-23","2022-06-24","2022-06-27","2022-06-28","2022-06-29","2022-06-30","2022-07-01","2022-07-05","2022-07-06","2022-07-07","2022-07-08","2022-07-11","2022-07-12","2022-07-13","2022-07-14","2022-07-15","2022-07-18","2022-07-19","2022-07-20","2022-07-21","2022-07-22","2022-07-25","2022-07-26","2022-07-27","2022-07-28","2022-07-29","2022-08-01","2022-08-02","2022-08-03","2022-08-04","2022-08-05","2022-08-08","2022-08-09","2022-08-10","2022-08-11","2022-08-12","2022-08-15","2022-08-16","2022-08-17","2022-08-18","2022-08-19","2022-08-22","2022-08-23","2022-08-24","2022-08-25","2022-08-26","2022-08-29","2022-08-30","2022-08-31","2022-09-01","2022-09-02","2022-09-06","2022-09-07","2022-09-08","2022-09-09","2022-09-12","2022-09-13","2022-09-14","2022-09-15","2022-09-16","2022-09-19","2022-09-20","2022-09-21","2022-09-22","2022-09-23","2022-09-26","2022-09-27","2022-09-28","2022-09-29","2022-09-30","2022-10-03","2022-10-04","2022-10-05","2022-10-06","2022-10-07","2022-10-10","2022-10-11","2022-10-12","2022-10-13","2022-10-14","2022-10-17","2022-10-18","2022-10-19","2022-10-20","2022-10-21","2022-10-24","2022-10-25","2022-10-26","2022-10-27","2022-10-28","2022-10-31","2022-11-01","2022-11-02","2022-11-03","2022-11-04","2022-11-07","2022-11-08","2022-11-09","2022-11-10","2022-11-11","2022-11-14","2022-11-15","2022-11-16","2022-11-17","2022-11-18","2022-11-21","2022-11-22","2022-11-23","2022-11-25","2022-11-28","2022-11-29","2022-11-30","2022-12-01","2022-12-02","2022-12-05","2022-12-06","2022-12-07","2022-12-08","2022-12-09","2022-12-12","2022-12-13","2022-12-14","2022-12-15","2022-12-16","2022-12-19","2022-12-20","2022-12-21","2022-12-22","2022-12-23","2022-12-27","2022-12-28","2022-12-29","2022-12-30","2023-01-03","2023-01-04","2023-01-05","2023-01-06","2023-01-09","2023-01-10","2023-01-11","2023-01-12","2023-01-13","2023-01-17","2023-01-18","2023-01-19","2023-01-20","2023-01-23","2023-01-24","2023-01-25","2023-01-26","2023-01-27","2023-01-30","2023-01-31","2023-02-01","2023-02-02","2023-02-03","2023-02-06","2023-02-07","2023-02-08","2023-02-09","2023-02-10","2023-02-13","2023-02-14","2023-02-15","2023-02-16","2023-02-17","2023-02-21","2023-02-22","2023-02-23","2023-02-24","2023-02-27","2023-02-28","2023-03-01","2023-03-02","2023-03-03","2023-03-06","2023-03-07","2023-03-08","2023-03-09","2023-03-10","2023-03-13","2023-03-14","2023-03-15","2023-03-16","2023-03-17","2023-03-20","2023-03-21","2023-03-22","2023-03-23","2023-03-24","2023-03-27","2023-03-28","2023-03-29","2023-03-30","2023-03-31","2023-04-03","2023-04-04","2023-04-05","2023-04-06","2023-04-10","2023-04-11","2023-04-12","2023-04-13","2023-04-14","2023-04-17","2023-04-18","2023-04-19","2023-04-20","2023-04-21","2023-04-24","2023-04-25","2023-04-26","2023-04-27","2023-04-28","2023-05-01","2023-05-02","2023-05-03","2023-05-04","2023-05-05","2023-05-08","2023-05-09","2023-05-10","2023-05-11","2023-05-12","2023-05-15","2023-05-16","2023-05-17","2023-05-18","2023-05-19","2023-05-22","2023-05-23","2023-05-24","2023-05-25","2023-05-26","2023-05-30","2023-05-31","2023-06-01","2023-06-02","2023-06-05","2023-06-06","2023-06-07","2023-06-08","2023-06-09","2023-06-12","2023-06-13","2023-06-14","2023-06-15","2023-06-16","2023-06-20","2023-06-21","2023-06-22","2023-06-23","2023-06-26","2023-06-27","2023-06-28","2023-06-29","2023-06-30","2023-07-03","2023-07-05","2023-07-06","2023-07-07","2023-07-10","2023-07-11","2023-07-12","2023-07-13","2023-07-14","2023-07-17","2023-07-18","2023-07-19","2023-07-20","2023-07-21","2023-07-24","2023-07-25","2023-07-26","2023-07-27","2023-07-28","2023-07-31","2023-08-01","2023-08-02","2023-08-03","2023-08-04","2023-08-07","2023-08-08","2023-08-09","2023-08-10","2023-08-11","2023-08-14","2023-08-15","2023-08-16","2023-08-17","2023-08-18","2023-08-21","2023-08-22","2023-08-23","2023-08-24","2023-08-25","2023-08-28","2023-08-29","2023-08-30","2023-08-31","2023-09-01","2023-09-05","2023-09-06","2023-09-07","2023-09-08","2023-09-11","2023-09-12","2023-09-13","2023-09-14","2023-09-15","2023-09-18","2023-09-19","2023-09-20","2023-09-21","2023-09-22","2023-09-25","2023-09-26","2023-09-27","2023-09-28","2023-09-29","2023-10-02","2023-10-03","2023-10-04","2023-10-05","2023-10-06","2023-10-09","2023-10-10","2023-10-11","2023-10-12","2023-10-13","2023-10-16","2023-10-17","2023-10-18","2023-10-19","2023-10-20","2023-10-23","2023-10-24","2023-10-25","2023-10-26","2023-10-27","2023-10-30","2023-10-31","2023-11-01","2023-11-02","2023-11-03","2023-11-06","2023-11-07","2023-11-08","2023-11-09","2023-11-10","2023-11-13","2023-11-14","2023-11-15","2023-11-16","2023-11-17","2023-11-20","2023-11-21","2023-11-22","2023-11-24","2023-11-27","2023-11-28","2023-11-29","2023-11-30","2023-12-01","2023-12-04","2023-12-05","2023-12-06","2023-12-07","2023-12-08","2023-12-11","2023-12-12","2023-12-13","2023-12-14","2023-12-15","2023-12-18","2023-12-19","2023-12-20","2023-12-21","2023-12-22","2023-12-26","2023-12-27","2023-12-28","2023-12-29"],"y":[1.0,0.998935,0.986139,0.972267,0.975276,0.977079,0.990744,0.993333,0.983621,0.983967,0.97545,0.976468,0.971015,0.964236,0.965648,0.963293,0.953478,0.944851,0.968789,0.982475,0.982565,0.987506,0.979889,0.980114,0.98273,0.991852,0.997202,0.985344,0.988487,0.992244,0.99557,1.00114,1.00089,0.996786,0.991169,0.984095,0.98631,0.989158,0.996083,1.0028,1.00406,1.00698,1.00982,1.01028,1.02354,1.01668,1.00844,0.995162,0.97605,0.974645,0.988908,0.99432,0.996615,1.00457,1.00801,1.01967,1.03314,1.03206,1.02266,1.03071,1.03291,1.02585,1.02119,1.03374,1.02203,1.01601,1.01907,1.01822,1.01128,1.02052,1.02988,1.01597,1.01742,1.0132,1.01587,1.01176,0.99496,0.986324,0.973193,0.968047,0.987668,0.973747,0.96317,0.968269,0.989281,0.965583,0.968295,0.94746,0.948106,0.934376,0.916127,0.921912,0.92382,0.928705,0.909514,0.910052,0.911021,0.92656,0.924668,0.921423,0.927871,0.941752,0.934011,0.937463,0.950553,0.930956,0.9301,0.939908,0.93762,0.923406,0.918599,0.890566,0.887921,0.90168,0.895855,0.894439,0.902217,0.903354,0.906501,0.913767,0.913113,0.902375,0.906073,0.896714,0.90135,0.895147,0.88931,0.897563,0.899402,0.891381,0.891608,0.893402,0.892487,0.895322,0.888659,0.899069,0.898629,0.911657,0.910117,0.905962,0.902181,0.919813,0.927894,0.941428,0.942314,0.935466,0.951016,0.959642,0.952635,0.956342,0.958214,0.966787,0.963532,0.977173,0.972263,0.970893,0.970734,0.968325,0.958094,0.945215,0.948317,0.950666,0.958185,0.936467,0.931617,0.92124,0.913051,0.909946,0.909746,0.903575,0.912436,0.905651,0.915292,0.932135,0.902698,0.904007,0.88703,0.886119,0.895298,0.897846,0.89295,0.890368,0.875748,0.870407,0.87377,0.880164,0.862992,0.853101,0.875904,0.892186,0.889817,0.886948,0.868537,0.861038,0.856597,0.857971,0.865036,0.847699,0.85856,0.862804,0.855966,0.854049,0.872345,0.875679,0.883586,0.880027,0.868648,0.888579,0.878709,0.877807,0.861089,0.844829,0.860249,0.859368,0.873112,0.859602,0.904109,0.914402,0.912343,0.918429,0.914217,0.914568,0.912001,0.901248,0.906943,0.912488,0.906094,0.892616,0.888286,0.911384,0.922468,0.919309,0.906685,0.899593,0.900148,0.904602,0.905496,0.906156,0.918178,0.911516,0.886459,0.886795,0.880205,0.889546,0.8959,0.881395,0.882257,0.882862,0.870976,0.882506,0.885969,0.879569,0.88811,0.877594,0.899264,0.901838,0.905389,0.911388,0.918157,0.928594,0.927306,0.923854,0.933669,0.937643,0.94634,0.951877,0.953179,0.95241,0.956125,0.947735,0.95297,0.9634,0.962939,0.956199,0.951004,0.958338,0.953477,0.946286,0.948283,0.95186,0.950796,0.949829,0.945578,0.944635,0.932962,0.930657,0.931487,0.921027,0.926115,0.92758,0.926069,0.927121,0.945334,0.948853,0.933334,0.936013,0.936425,0.9442,0.962522,0.963908,0.96959,0.977484,0.993412,0.999237,0.991662,0.99886,1.00934,1.00521,0.994776,0.998441,1.00257,1.01195,1.01455,1.02205,1.03264,1.02777,1.02525,1.01438,1.01555,1.01705,1.03847,1.02608,1.02327,1.02864,1.02827,1.0285,1.01838,1.02103,1.02063,1.01713,1.02799,1.03111,1.02805,1.03783,1.04077,1.04148,1.04932,1.04995,1.05051,1.05374,1.0486,1.04531,1.04553,1.03747,1.03671,1.03398,1.04043,1.03671,1.03132,1.02688,1.02353,1.03169,1.03991,1.04075,1.05233,1.045,1.04556,1.04539,1.03461,1.04921,1.04843,1.05448,1.04874,1.05058,1.05975,1.05625,1.04998,1.04664,1.0476,1.04854,1.04632,1.05,1.05136,1.05149,1.06576,1.06293,1.05813,1.05742,1.05937,1.05503,1.0561,1.06841,1.07065,1.069,1.07714,1.08369,1.08699,1.0792,1.0745,1.0737,1.0792,1.08432,1.07142,1.08246,1.08559,1.07712,1.0671,1.06361,1.04446,1.03574,1.03402,1.02735,1.02618,1.02632,1.02836,1.02205,1.01648,1.00956,1.0108,1.01561,1.01985,1.03509,1.02389,1.0283,1.03374,1.0489,1.05869,1.05817,1.06219,1.05769,1.03906,1.02723,1.02888,1.03277,1.02246,1.01618,1.02006,1.02238,1.0329,1.03488,1.02698,1.01886,1.02283,1.02267,1.00817,0.997097,0.994708,0.989792,0.989519,0.984683,0.987553,0.989402,0.998416,1.01266,1.01026,1.01789,1.01819,1.03303,1.02973,1.0272,1.03303,1.03979,1.03549,1.03364,1.03459,1.03179,1.02296,1.03343,1.03465,1.03229,1.03776,1.04826,1.04842,1.04948,1.0529,1.04913,1.05049,1.05356,1.05326,1.06497,1.06465,1.07568,1.07557,1.07864,1.08357,1.08241,1.08259,1.08647,1.09647,1.09503,1.09367,1.1079,1.08939,1.09626,1.09607,1.10169,1.09641,1.08344,1.08667,1.10852,1.11266,1.10544,1.10444,1.1113,1.10283,1.10706,1.10743,1.11113,1.11436,1.11151,1.10803],"sx":[70.08,70.73,71.38,72.03,72.68,74.63,75.28,75.93,76.58,77.23,79.82,80.47,81.12,81.77,83.72,84.37,85.02,85.67,86.32,88.27,88.92,89.57,90.22,90.87,92.82,93.47,94.12,94.77,95.42,97.37,98.02,98.67,99.32,99.97,102.57,103.22,103.87,104.52,106.47,107.12,107.77,108.42,109.06,111.01,111.66,112.31,112.96,113.61,115.56,116.21,116.86,117.51,118.16,120.11,120.76,121.41,122.06,122.71,124.66,125.31,125.96,126.61,127.26,129.21,129.86,130.51,131.16,131.81,133.76,134.41,135.06,135.71,138.31,138.96,139.61,140.25,140.9,142.85,143.5,144.15,144.8,145.45,147.4,148.05,148.7,149.35,150.0,151.95,152.6,153.25,153.9,154.55,156.5,157.15,157.8,158.45,159.1,161.05,161.7,162.35,163.0,163.65,166.25,166.9,167.55,168.2,170.15,170.8,171.44,172.09,172.74,174.69,175.34,175.99,176.64,177.29,179.89,180.54,181.19,181.84,183.79,184.44,185.09,185.74,186.39,188.99,189.64,190.29,190.94,192.89,193.54,194.19,194.84,195.49,197.44,198.09,198.74,199.39,200.04,201.99,202.63,203.28,203.93,204.58,206.53,207.18,207.83,208.48,209.13,211.08,211.73,212.38,213.03,213.68,215.63,216.28,216.93,217.58,218.23,220.18,220.83,221.48,222.13,222.78,224.73,225.38,226.03,226.68,227.33,229.93,230.58,231.23,231.88,233.82,234.47,235.12,235.77,236.42,238.37,239.02,239.67,240.32,240.97,242.92,243.57,244.22,244.87,245.52,247.47,248.12,248.77,249.42,250.07,252.02,252.67,253.32,253.97,254.62,256.57,257.22,257.87,258.52,259.17,261.12,261.77,262.42,263.07,263.72,265.66,266.31,266.96,267.61,268.26,270.21,270.86,271.51,272.16,272.81,274.76,275.41,276.06,276.71,277.36,279.31,279.96,280.61,281.91,283.86,284.51,285.16,285.81,286.46,288.41,289.06,289.71,290.36,291.01,292.96,293.61,294.26,294.91,295.56,297.5,298.15,298.8,299.45,300.1,302.7,303.35,304.0,304.65,307.25,307.9,308.55,309.2,311.15,311.8,312.45,313.1,313.75,316.35,317.0,317.65,318.3,320.25,320.9,321.55,322.2,322.85,324.8,325.45,326.1,326.75,327.4,329.34,329.99,330.64,331.29,331.94,333.89,334.54,335.19,335.84,336.49,339.09,339.74,340.39,341.04,342.99,343.64,344.29,344.94,345.59,347.54,348.19,348.84,349.49,350.14,352.09,352.74,353.39,354.04,354.69,356.64,357.29,357.94,358.59,359.23,361.18,361.83,362.48,363.13,363.78,365.73,366.38,367.03,367.68,370.28,370.93,371.58,372.23,372.88,374.83,375.48,376.13,376.78,377.43,379.38,380.03,380.68,381.33,381.98,383.93,384.58,385.23,385.88,386.53,388.48,389.13,389.78,390.42,391.07,393.02,393.67,394.32,394.97,395.62,397.57,398.22,398.87,399.52,400.17,402.77,403.42,404.07,404.72,406.67,407.32,407.97,408.62,409.27,411.22,411.87,412.52,413.17,413.82,416.42,417.07,417.72,418.37,420.32,420.97,421.61,422.26,422.91,424.86,426.16,426.81,427.46,429.41,430.06,430.71,431.36,432.01,433.96,434.61,435.26,435.91,436.56,438.51,439.16,439.81,440.46,441.11,443.06,443.71,444.36,445.01,445.66,447.61,448.26,448.91,449.56,450.21,452.16,452.8,453.45,454.1,454.75,456.7,457.35,458.0,458.65,459.3,461.25,461.9,462.55,463.2,463.85,466.45,467.1,467.75,468.4,470.35,471.0,471.65,472.3,472.95,474.9,475.55,476.2,476.85,477.5,479.45,480.1,480.75,481.4,482.05,483.99,484.64,485.29,485.94,486.59,488.54,489.19,489.84,490.49,491.14,493.09,493.74,494.39,495.04,495.69,497.64,498.29,498.94,499.59,500.24,502.19,502.84,503.49,504.14,504.79,506.74,507.39,508.04,508.69,509.34,511.29,511.94,512.59,513.24,513.89,515.83,516.48,517.13,518.43,520.38,521.03,521.68,522.33,522.98,524.93,525.58,526.23,526.88,527.53,529.48,530.13,530.78,531.43,532.08,534.03,534.68,535.33,535.98,536.63,539.23,539.88,540.53,541.18],"sy":[113.1,113.47,117.91,122.73,121.69,121.06,116.31,115.42,118.79,118.67,121.63,121.27,123.17,125.52,125.03,125.85,129.26,132.25,123.94,119.19,119.15,117.44,120.08,120.01,119.1,115.93,114.07,118.19,117.1,115.79,114.64,112.7,112.79,114.22,116.17,118.62,117.85,116.87,114.46,112.13,111.69,110.68,109.69,109.53,104.93,107.31,110.17,114.78,121.42,121.9,116.95,115.07,114.28,111.51,110.32,106.27,101.59,101.97,105.23,102.44,101.67,104.13,105.74,101.38,105.45,107.54,106.48,106.77,109.18,105.98,102.72,107.56,107.05,108.52,107.59,109.02,114.85,117.85,122.41,124.2,117.38,122.22,125.89,124.12,116.82,125.05,124.11,131.34,131.12,135.89,142.23,140.22,139.55,137.86,144.52,144.33,144.0,138.6,139.26,140.39,138.15,133.33,136.02,134.82,130.27,137.08,137.37,133.97,134.76,139.7,141.37,151.1,152.02,147.24,149.26,149.76,147.06,146.66,145.57,143.04,143.27,147.0,145.72,148.97,147.36,149.51,151.54,148.67,148.03,150.82,150.74,150.12,150.43,149.45,151.76,148.15,148.3,143.78,144.31,145.76,147.07,140.95,138.14,133.44,133.13,135.51,130.11,127.11,129.55,128.26,127.61,124.63,125.76,121.03,122.73,123.21,123.26,124.1,127.65,132.12,131.05,130.23,127.62,135.16,136.85,140.45,143.29,144.37,144.44,146.58,143.51,145.86,142.52,136.67,146.89,146.43,152.33,152.65,149.46,148.57,150.27,151.17,156.25,158.1,156.93,154.71,160.68,164.11,156.19,150.54,151.36,152.36,158.75,161.35,162.9,162.42,159.97,165.99,162.22,160.74,163.12,163.78,157.43,156.27,153.53,154.76,158.71,151.79,155.22,155.53,161.34,166.98,161.63,161.93,157.16,161.85,146.4,142.82,143.54,141.43,142.89,142.77,143.66,147.39,145.41,143.49,145.71,150.39,151.89,143.87,140.02,141.12,145.5,147.97,147.77,146.23,145.92,145.69,141.51,143.83,152.53,152.41,154.7,151.46,149.25,154.29,153.99,153.78,157.9,153.9,152.7,154.92,151.95,155.61,148.08,147.19,145.95,143.87,141.52,137.9,138.34,139.54,136.13,134.75,131.73,129.81,129.36,129.63,128.34,131.25,129.43,125.81,125.97,128.31,130.11,127.57,129.26,131.75,131.06,129.82,130.19,130.52,132.0,132.33,136.38,137.18,136.89,140.52,138.76,138.25,138.77,138.41,132.08,130.86,136.25,135.32,135.18,132.48,126.11,125.63,123.66,120.92,115.39,113.37,116.0,113.5,109.86,111.29,114.91,113.64,112.21,108.95,108.05,105.44,101.77,103.46,104.33,108.11,107.7,107.18,99.74,104.04,105.02,103.16,103.28,103.2,106.72,105.8,105.93,107.15,103.38,102.3,103.36,99.96,98.94,98.7,95.97,95.75,95.56,94.44,96.22,97.37,97.29,100.09,100.35,101.3,99.06,100.35,102.22,103.77,104.93,102.09,99.24,98.95,94.93,97.47,97.28,97.34,101.08,96.01,96.28,94.18,96.17,95.54,92.35,93.57,95.74,96.9,96.57,96.25,97.02,95.74,95.27,95.22,90.26,91.25,92.91,93.16,92.48,93.99,93.62,89.35,88.57,89.14,86.31,84.04,82.89,85.6,87.23,87.51,85.6,83.82,88.3,84.47,83.38,86.32,89.8,91.01,97.66,100.69,101.29,103.6,104.01,103.96,103.25,105.44,107.38,109.78,109.35,107.68,106.21,100.92,104.8,103.27,101.38,96.12,92.72,92.9,91.51,93.07,99.54,103.64,103.07,101.72,105.3,107.48,106.14,105.33,101.67,100.99,103.73,106.55,105.17,105.23,110.26,114.11,114.94,116.64,116.74,118.42,117.42,116.78,113.65,108.7,109.54,106.89,106.78,101.63,102.78,103.65,101.63,99.28,100.78,101.42,101.09,102.06,105.13,101.49,101.07,101.89,99.99,96.34,96.29,95.92,94.73,96.04,95.57,94.5,94.61,90.54,90.65,86.82,86.86,85.79,84.08,84.48,84.42,83.07,79.6,80.1,80.57,75.63,82.06,79.67,79.74,77.79,79.62,84.12,83.0,75.42,73.98,76.49,76.83,74.45,77.39,75.92,75.8,74.51,73.39,74.38,75.59]},{"panel":0,"label":"equal weights, 20% each","color":"var(--chart-blue, #3b6ea5)","x":["2022-01-03","2022-01-04","2022-01-05","2022-01-06","2022-01-07","2022-01-10","2022-01-11","2022-01-12","2022-01-13","2022-01-14","2022-01-18","2022-01-19","2022-01-20","2022-01-21","2022-01-24","2022-01-25","2022-01-26","2022-01-27","2022-01-28","2022-01-31","2022-02-01","2022-02-02","2022-02-03","2022-02-04","2022-02-07","2022-02-08","2022-02-09","2022-02-10","2022-02-11","2022-02-14","2022-02-15","2022-02-16","2022-02-17","2022-02-18","2022-02-22","2022-02-23","2022-02-24","2022-02-25","2022-02-28","2022-03-01","2022-03-02","2022-03-03","2022-03-04","2022-03-07","2022-03-08","2022-03-09","2022-03-10","2022-03-11","2022-03-14","2022-03-15","2022-03-16","2022-03-17","2022-03-18","2022-03-21","2022-03-22","2022-03-23","2022-03-24","2022-03-25","2022-03-28","2022-03-29","2022-03-30","2022-03-31","2022-04-01","2022-04-04","2022-04-05","2022-04-06","2022-04-07","2022-04-08","2022-04-11","2022-04-12","2022-04-13","2022-04-14","2022-04-18","2022-04-19","2022-04-20","2022-04-21","2022-04-22","2022-04-25","2022-04-26","2022-04-27","2022-04-28","2022-04-29","2022-05-02","2022-05-03","2022-05-04","2022-05-05","2022-05-06","2022-05-09","2022-05-10","2022-05-11","2022-05-12","2022-05-13","2022-05-16","2022-05-17","2022-05-18","2022-05-19","2022-05-20","2022-05-23","2022-05-24","2022-05-25","2022-05-26","2022-05-27","2022-05-31","2022-06-01","2022-06-02","2022-06-03","2022-06-06","2022-06-07","2022-06-08","2022-06-09","2022-06-10","2022-06-13","2022-06-14","2022-06-15","2022-06-16","2022-06-17","2022-06-21","2022-06-22","2022-06-23","2022-06-24","2022-06-27","2022-06-28","2022-06-29","2022-06-30","2022-07-01","2022-07-05","2022-07-06","2022-07-07","2022-07-08","2022-07-11","2022-07-12","2022-07-13","2022-07-14","2022-07-15","2022-07-18","2022-07-19","2022-07-20","2022-07-21","2022-07-22","2022-07-25","2022-07-26","2022-07-27","2022-07-28","2022-07-29","2022-08-01","2022-08-02","2022-08-03","2022-08-04","2022-08-05","2022-08-08","2022-08-09","2022-08-10","2022-08-11","2022-08-12","2022-08-15","2022-08-16","2022-08-17","2022-08-18","2022-08-19","2022-08-22","2022-08-23","2022-08-24","2022-08-25","2022-08-26","2022-08-29","2022-08-30","2022-08-31","2022-09-01","2022-09-02","2022-09-06","2022-09-07","2022-09-08","2022-09-09","2022-09-12","2022-09-13","2022-09-14","2022-09-15","2022-09-16","2022-09-19","2022-09-20","2022-09-21","2022-09-22","2022-09-23","2022-09-26","2022-09-27","2022-09-28","2022-09-29","2022-09-30","2022-10-03","2022-10-04","2022-10-05","2022-10-06","2022-10-07","2022-10-10","2022-10-11","2022-10-12","2022-10-13","2022-10-14","2022-10-17","2022-10-18","2022-10-19","2022-10-20","2022-10-21","2022-10-24","2022-10-25","2022-10-26","2022-10-27","2022-10-28","2022-10-31","2022-11-01","2022-11-02","2022-11-03","2022-11-04","2022-11-07","2022-11-08","2022-11-09","2022-11-10","2022-11-11","2022-11-14","2022-11-15","2022-11-16","2022-11-17","2022-11-18","2022-11-21","2022-11-22","2022-11-23","2022-11-25","2022-11-28","2022-11-29","2022-11-30","2022-12-01","2022-12-02","2022-12-05","2022-12-06","2022-12-07","2022-12-08","2022-12-09","2022-12-12","2022-12-13","2022-12-14","2022-12-15","2022-12-16","2022-12-19","2022-12-20","2022-12-21","2022-12-22","2022-12-23","2022-12-27","2022-12-28","2022-12-29","2022-12-30","2023-01-03","2023-01-04","2023-01-05","2023-01-06","2023-01-09","2023-01-10","2023-01-11","2023-01-12","2023-01-13","2023-01-17","2023-01-18","2023-01-19","2023-01-20","2023-01-23","2023-01-24","2023-01-25","2023-01-26","2023-01-27","2023-01-30","2023-01-31","2023-02-01","2023-02-02","2023-02-03","2023-02-06","2023-02-07","2023-02-08","2023-02-09","2023-02-10","2023-02-13","2023-02-14","2023-02-15","2023-02-16","2023-02-17","2023-02-21","2023-02-22","2023-02-23","2023-02-24","2023-02-27","2023-02-28","2023-03-01","2023-03-02","2023-03-03","2023-03-06","2023-03-07","2023-03-08","2023-03-09","2023-03-10","2023-03-13","2023-03-14","2023-03-15","2023-03-16","2023-03-17","2023-03-20","2023-03-21","2023-03-22","2023-03-23","2023-03-24","2023-03-27","2023-03-28","2023-03-29","2023-03-30","2023-03-31","2023-04-03","2023-04-04","2023-04-05","2023-04-06","2023-04-10","2023-04-11","2023-04-12","2023-04-13","2023-04-14","2023-04-17","2023-04-18","2023-04-19","2023-04-20","2023-04-21","2023-04-24","2023-04-25","2023-04-26","2023-04-27","2023-04-28","2023-05-01","2023-05-02","2023-05-03","2023-05-04","2023-05-05","2023-05-08","2023-05-09","2023-05-10","2023-05-11","2023-05-12","2023-05-15","2023-05-16","2023-05-17","2023-05-18","2023-05-19","2023-05-22","2023-05-23","2023-05-24","2023-05-25","2023-05-26","2023-05-30","2023-05-31","2023-06-01","2023-06-02","2023-06-05","2023-06-06","2023-06-07","2023-06-08","2023-06-09","2023-06-12","2023-06-13","2023-06-14","2023-06-15","2023-06-16","2023-06-20","2023-06-21","2023-06-22","2023-06-23","2023-06-26","2023-06-27","2023-06-28","2023-06-29","2023-06-30","2023-07-03","2023-07-05","2023-07-06","2023-07-07","2023-07-10","2023-07-11","2023-07-12","2023-07-13","2023-07-14","2023-07-17","2023-07-18","2023-07-19","2023-07-20","2023-07-21","2023-07-24","2023-07-25","2023-07-26","2023-07-27","2023-07-28","2023-07-31","2023-08-01","2023-08-02","2023-08-03","2023-08-04","2023-08-07","2023-08-08","2023-08-09","2023-08-10","2023-08-11","2023-08-14","2023-08-15","2023-08-16","2023-08-17","2023-08-18","2023-08-21","2023-08-22","2023-08-23","2023-08-24","2023-08-25","2023-08-28","2023-08-29","2023-08-30","2023-08-31","2023-09-01","2023-09-05","2023-09-06","2023-09-07","2023-09-08","2023-09-11","2023-09-12","2023-09-13","2023-09-14","2023-09-15","2023-09-18","2023-09-19","2023-09-20","2023-09-21","2023-09-22","2023-09-25","2023-09-26","2023-09-27","2023-09-28","2023-09-29","2023-10-02","2023-10-03","2023-10-04","2023-10-05","2023-10-06","2023-10-09","2023-10-10","2023-10-11","2023-10-12","2023-10-13","2023-10-16","2023-10-17","2023-10-18","2023-10-19","2023-10-20","2023-10-23","2023-10-24","2023-10-25","2023-10-26","2023-10-27","2023-10-30","2023-10-31","2023-11-01","2023-11-02","2023-11-03","2023-11-06","2023-11-07","2023-11-08","2023-11-09","2023-11-10","2023-11-13","2023-11-14","2023-11-15","2023-11-16","2023-11-17","2023-11-20","2023-11-21","2023-11-22","2023-11-24","2023-11-27","2023-11-28","2023-11-29","2023-11-30","2023-12-01","2023-12-04","2023-12-05","2023-12-06","2023-12-07","2023-12-08","2023-12-11","2023-12-12","2023-12-13","2023-12-14","2023-12-15","2023-12-18","2023-12-19","2023-12-20","2023-12-21","2023-12-22","2023-12-26","2023-12-27","2023-12-28","2023-12-29"],"y":[1.0,1.01397,1.00306,1.00432,1.00843,1.00773,1.02437,1.02645,1.01751,1.00901,0.997208,0.99168,0.986109,0.972792,0.975609,0.980694,0.976161,0.971889,0.990109,1.00412,1.02388,1.02563,1.01311,1.02423,1.02803,1.03055,1.0352,1.02318,1.02325,1.01832,1.02324,1.02679,1.01678,1.01181,1.00382,0.993938,0.989929,1.00625,1.00242,0.997108,1.00972,1.01011,1.01355,1.01038,1.01403,1.00852,1.00974,0.996655,0.979451,0.9722,0.988882,1.00204,1.00483,1.01861,1.02558,1.02816,1.03871,1.04678,1.03624,1.04139,1.04428,1.02889,1.02816,1.03624,1.02542,1.02108,1.02713,1.03441,1.01737,1.02419,1.02889,1.02199,1.02773,1.03077,1.03271,1.02402,1.00102,0.990226,0.974041,0.97816,1.00205,0.9776,0.980143,0.992059,1.02288,0.997096,1.00136,0.961718,0.961129,0.955997,0.949463,0.966323,0.971501,0.986406,0.963009,0.96048,0.962057,0.987779,0.988867,0.996468,1.00687,1.02296,1.01516,1.01791,1.02854,1.01939,1.01851,1.03932,1.03773,1.01647,0.995024,0.958263,0.955526,0.961123,0.938481,0.921334,0.94995,0.937445,0.930863,0.949162,0.953977,0.952885,0.943053,0.926415,0.938313,0.92792,0.921019,0.939457,0.94016,0.931551,0.926969,0.926386,0.916174,0.931473,0.930443,0.950057,0.95467,0.957757,0.952421,0.96075,0.953661,0.974136,0.982112,1.00533,0.995487,0.987957,0.989557,0.978424,0.983991,0.984747,0.991292,1.00578,1.01514,1.02909,1.02343,1.02195,1.02216,1.02761,1.01607,1.00402,1.01606,1.01976,1.03071,1.00641,1.00988,0.991342,0.983529,0.978608,0.980696,0.975515,0.982068,0.986283,0.998998,1.01388,0.980574,0.989359,0.973714,0.96538,0.972293,0.966603,0.952052,0.946668,0.920003,0.908004,0.913595,0.931083,0.91675,0.903116,0.935318,0.964102,0.97374,0.977482,0.959002,0.946969,0.937442,0.940723,0.967072,0.949783,0.969245,0.977327,0.980621,0.978478,1.00378,1.01012,1.01436,1.01689,1.01267,1.03881,1.03359,1.03821,1.01768,1.0137,1.02957,1.03615,1.04321,1.01507,1.05479,1.0723,1.06903,1.07434,1.06745,1.0674,1.0659,1.05594,1.07386,1.07708,1.07296,1.05023,1.05273,1.07274,1.07228,1.06639,1.04389,1.02843,1.02687,1.03452,1.02962,1.04392,1.05328,1.04576,1.02338,1.01749,1.0157,1.0249,1.03683,1.01946,1.03053,1.03507,1.02273,1.03433,1.03992,1.02445,1.03166,1.03354,1.05377,1.04725,1.05669,1.06721,1.07601,1.08497,1.08101,1.0639,1.06608,1.07839,1.08528,1.09239,1.09159,1.10983,1.10551,1.09132,1.10511,1.10626,1.0977,1.09989,1.09663,1.11499,1.10598,1.10022,1.118,1.12258,1.1182,1.1187,1.11065,1.0954,1.08294,1.07592,1.08201,1.07742,1.08104,1.08018,1.08058,1.08221,1.10074,1.10515,1.08382,1.07898,1.06291,1.06235,1.06187,1.07135,1.04667,1.05442,1.04742,1.06208,1.08176,1.06849,1.06856,1.06656,1.07476,1.08031,1.09154,1.09751,1.10418,1.12896,1.12558,1.12962,1.12312,1.11761,1.12117,1.12034,1.13412,1.14285,1.1395,1.15126,1.15,1.14522,1.14224,1.1509,1.13799,1.12935,1.14486,1.15435,1.14481,1.12785,1.11637,1.10623,1.12661,1.12869,1.12683,1.12479,1.11578,1.11156,1.11422,1.1006,1.11565,1.12166,1.12487,1.11759,1.11581,1.11542,1.11014,1.11535,1.1164,1.10723,1.12013,1.13219,1.12827,1.13168,1.13657,1.14247,1.14035,1.14172,1.14221,1.13831,1.14892,1.14443,1.13236,1.13348,1.12996,1.12483,1.12961,1.13463,1.13759,1.14908,1.16198,1.16298,1.1576,1.14088,1.143,1.1475,1.15612,1.16509,1.16207,1.15062,1.16128,1.16373,1.16882,1.17267,1.17071,1.18095,1.18264,1.18397,1.17666,1.18013,1.19339,1.18657,1.17272,1.17786,1.16816,1.16609,1.16557,1.16485,1.16601,1.17281,1.1758,1.15607,1.14555,1.14582,1.15243,1.15192,1.14721,1.15385,1.14304,1.1527,1.15998,1.17289,1.18095,1.1792,1.18989,1.18549,1.17867,1.16888,1.17563,1.17455,1.18263,1.17661,1.19075,1.18232,1.19053,1.18986,1.18035,1.16694,1.16692,1.17331,1.16293,1.17254,1.17277,1.16109,1.15353,1.14828,1.13729,1.13061,1.13346,1.15216,1.1517,1.1429,1.14162,1.15953,1.16037,1.16342,1.16564,1.16565,1.15154,1.1426,1.14109,1.13645,1.12713,1.11681,1.12335,1.12586,1.12978,1.15288,1.15196,1.14856,1.1454,1.1412,1.1396,1.15032,1.15235,1.16572,1.16577,1.16851,1.17897,1.18112,1.18159,1.1811,1.18304,1.18145,1.18554,1.18034,1.18448,1.19279,1.18443,1.18122,1.17334,1.17567,1.18123,1.17775,1.17679,1.19173,1.20671,1.20304,1.20718,1.21856,1.20383,1.20997,1.21065,1.21471,1.21593,1.21136,1.20827],"sx":[70.08,70.73,71.38,72.03,72.68,74.63,75.28,75.93,76.58,77.23,79.82,80.47,81.12,81.77,83.72,84.37,85.02,85.67,86.32,88.27,88.92,89.57,90.22,90.87,92.82,93.47,94.12,94.77,95.42,97.37,98.02,98.67,99.32,99.97,102.57,103.22,103.87,104.52,106.47,107.12,107.77,108.42,109.06,111.01,111.66,112.31,112.96,113.61,115.56,116.21,116.86,117.51,118.16,120.11,120.76,121.41,122.06,122.71,124.66,125.31,125.96,126.61,127.26,129.21,129.86,130.51,131.16,131.81,133.76,134.41,135.06,135.71,138.31,138.96,139.61,140.25,140.9,142.85,143.5,144.15,144.8,145.45,147.4,148.05,148.7,149.35,150.0,151.95,152.6,153.25,153.9,154.55,156.5,157.15,157.8,158.45,159.1,161.05,161.7,162.35,163.0,163.65,166.25,166.9,167.55,168.2,170.15,170.8,171.44,172.09,172.74,174.69,175.34,175.99,176.64,177.29,179.89,180.54,181.19,181.84,183.79,184.44,185.09,185.74,186.39,188.99,189.64,190.29,190.94,192.89,193.54,194.19,194.84,195.49,197.44,198.09,198.74,199.39,200.04,201.99,202.63,203.28,203.93,204.58,206.53,207.18,207.83,208.48,209.13,211.08,211.73,212.38,213.03,213.68,215.63,216.28,216.93,217.58,218.23,220.18,220.83,221.48,222.13,222.78,224.73,225.38,226.03,226.68,227.33,229.93,230.58,231.23,231.88,233.82,234.47,235.12,235.77,236.42,238.37,239.02,239.67,240.32,240.97,242.92,243.57,244.22,244.87,245.52,247.47,248.12,248.77,249.42,250.07,252.02,252.67,253.32,253.97,254.62,256.57,257.22,257.87,258.52,259.17,261.12,261.77,262.42,263.07,263.72,265.66,266.31,266.96,267.61,268.26,270.21,270.86,271.51,272.16,272.81,274.76,275.41,276.06,276.71,277.36,279.31,279.96,280.61,281.91,283.86,284.51,285.16,285.81,286.46,288.41,289.06,289.71,290.36,291.01,292.96,293.61,294.26,294.91,295.56,297.5,298.15,298.8,299.45,300.1,302.7,303.35,304.0,304.65,307.25,307.9,308.55,309.2,311.15,311.8,312.45,313.1,313.75,316.35,317.0,317.65,318.3,320.25,320.9,321.55,322.2,322.85,324.8,325.45,326.1,326.75,327.4,329.34,329.99,330.64,331.29,331.94,333.89,334.54,335.19,335.84,336.49,339.09,339.74,340.39,341.04,342.99,343.64,344.29,344.94,345.59,347.54,348.19,348.84,349.49,350.14,352.09,352.74,353.39,354.04,354.69,356.64,357.29,357.94,358.59,359.23,361.18,361.83,362.48,363.13,363.78,365.73,366.38,367.03,367.68,370.28,370.93,371.58,372.23,372.88,374.83,375.48,376.13,376.78,377.43,379.38,380.03,380.68,381.33,381.98,383.93,384.58,385.23,385.88,386.53,388.48,389.13,389.78,390.42,391.07,393.02,393.67,394.32,394.97,395.62,397.57,398.22,398.87,399.52,400.17,402.77,403.42,404.07,404.72,406.67,407.32,407.97,408.62,409.27,411.22,411.87,412.52,413.17,413.82,416.42,417.07,417.72,418.37,420.32,420.97,421.61,422.26,422.91,424.86,426.16,426.81,427.46,429.41,430.06,430.71,431.36,432.01,433.96,434.61,435.26,435.91,436.56,438.51,439.16,439.81,440.46,441.11,443.06,443.71,444.36,445.01,445.66,447.61,448.26,448.91,449.56,450.21,452.16,452.8,453.45,454.1,454.75,456.7,457.35,458.0,458.65,459.3,461.25,461.9,462.55,463.2,463.85,466.45,467.1,467.75,468.4,470.35,471.0,471.65,472.3,472.95,474.9,475.55,476.2,476.85,477.5,479.45,480.1,480.75,481.4,482.05,483.99,484.64,485.29,485.94,486.59,488.54,489.19,489.84,490.49,491.14,493.09,493.74,494.39,495.04,495.69,497.64,498.29,498.94,499.59,500.24,502.19,502.84,503.49,504.14,504.79,506.74,507.39,508.04,508.69,509.34,511.29,511.94,512.59,513.24,513.89,515.83,516.48,517.13,518.43,520.38,521.03,521.68,522.33,522.98,524.93,525.58,526.23,526.88,527.53,529.48,530.13,530.78,531.43,532.08,534.03,534.68,535.33,535.98,536.63,539.23,539.88,540.53,541.18],"sy":[113.1,108.25,112.04,111.6,110.17,110.42,104.64,103.92,107.02,109.97,114.07,115.99,117.92,122.55,121.57,119.8,121.38,122.86,116.53,111.67,104.81,104.2,108.55,104.69,103.37,102.49,100.88,105.05,105.03,106.74,105.03,103.8,107.27,109.0,111.77,115.21,116.6,110.93,112.26,114.1,109.72,109.59,108.4,109.49,108.23,110.14,109.72,114.26,120.24,122.75,116.96,112.39,111.42,106.64,104.22,103.32,99.66,96.86,100.51,98.73,97.72,103.07,103.32,100.52,104.27,105.78,103.68,101.15,107.07,104.7,103.07,105.46,103.47,102.42,101.74,104.76,112.74,116.49,122.11,120.68,112.39,120.88,120.0,115.86,105.15,114.11,112.63,126.39,126.6,128.38,130.65,124.79,123.0,117.82,125.95,126.82,126.28,117.34,116.97,114.33,110.72,105.13,107.84,106.88,103.19,106.37,106.67,99.45,100.0,107.38,114.83,127.59,128.54,126.6,134.46,140.42,130.48,134.82,137.11,130.75,129.08,129.46,132.87,138.65,134.52,138.13,140.53,134.12,133.88,136.87,138.46,138.66,142.21,136.9,137.25,130.44,128.84,127.77,129.62,126.73,129.19,122.08,119.31,111.25,114.67,117.28,116.73,120.59,118.66,118.4,116.12,111.09,107.84,103.0,104.96,105.48,105.41,103.51,107.52,111.71,107.52,106.24,102.44,110.87,109.67,116.11,118.82,120.53,119.8,121.6,119.33,117.86,113.45,108.28,119.85,116.8,122.23,125.12,122.72,124.7,129.75,131.62,140.88,145.05,143.1,137.03,142.01,146.74,135.56,125.57,122.22,120.92,127.34,131.52,134.82,133.68,124.53,130.54,123.78,120.97,119.83,120.57,111.79,109.59,108.11,107.24,108.7,99.62,101.44,99.83,106.96,108.34,102.83,100.55,98.1,107.87,94.08,87.99,89.13,87.29,89.68,89.7,90.22,93.67,87.45,86.33,87.77,95.66,94.79,87.84,88.0,90.05,97.86,103.23,103.77,101.11,102.81,97.85,94.6,97.21,104.98,107.03,107.65,104.45,100.31,106.34,102.5,100.92,105.21,101.18,99.24,104.61,102.11,101.45,94.43,96.69,93.41,89.76,86.71,83.59,84.97,90.91,90.15,85.88,83.49,81.02,81.29,74.96,76.46,81.39,76.6,76.2,79.17,78.41,79.54,73.17,76.3,78.3,72.13,70.53,72.06,71.88,74.68,79.97,84.3,86.74,84.62,86.22,84.96,85.26,85.12,84.55,78.12,76.59,83.99,85.67,91.26,91.45,91.62,88.32,96.89,94.2,96.63,91.54,84.71,89.32,89.29,89.99,87.14,85.21,81.31,79.24,76.92,68.32,69.49,68.09,70.35,72.26,71.02,71.31,66.53,63.49,64.66,60.57,61.01,62.67,63.71,60.7,65.18,68.18,62.8,59.5,62.81,68.7,72.69,76.21,69.14,68.41,69.06,69.77,72.9,74.36,73.44,78.17,72.94,70.85,69.74,72.27,72.88,73.02,74.85,73.05,72.68,75.87,71.38,67.2,68.56,67.37,65.68,63.63,64.36,63.89,63.72,65.07,61.39,62.95,67.14,66.75,67.97,69.75,68.09,66.35,65.32,61.33,56.85,56.51,58.37,64.18,63.44,61.88,58.89,55.77,56.82,60.8,57.1,56.24,54.48,53.14,53.82,50.26,49.68,49.22,51.75,50.55,45.95,48.31,53.12,51.34,54.71,55.42,55.61,55.86,55.45,53.09,52.05,58.9,62.56,62.46,60.17,60.35,61.98,59.68,63.43,60.07,57.55,53.06,50.27,50.87,47.16,48.69,51.06,54.46,52.11,52.49,49.68,51.77,46.86,49.79,46.94,47.17,50.47,55.13,55.14,52.92,56.52,53.19,53.11,57.16,59.79,61.61,65.43,67.75,66.76,60.26,60.42,63.48,63.92,57.7,57.41,56.35,55.58,55.58,60.48,63.58,64.11,65.72,68.95,72.54,70.27,69.4,68.03,60.01,60.33,61.51,62.61,64.07,64.63,60.9,60.2,55.55,55.54,54.58,50.95,50.2,50.04,50.21,49.54,50.09,48.67,50.48,49.04,46.15,49.06,50.17,52.91,52.1,50.17,51.38,51.71,46.52,41.32,42.59,41.16,37.21,42.32,40.19,39.95,38.54,38.12,39.71,40.78]},{"panel":0,"label":"SPY","color":"var(--chart-grey, #a3a19c)","x":["2022-01-03","2022-01-04","2022-01-05","2022-01-06","2022-01-07","2022-01-10","2022-01-11","2022-01-12","2022-01-13","2022-01-14","2022-01-18","2022-01-19","2022-01-20","2022-01-21","2022-01-24","2022-01-25","2022-01-26","2022-01-27","2022-01-28","2022-01-31","2022-02-01","2022-02-02","2022-02-03","2022-02-04","2022-02-07","2022-02-08","2022-02-09","2022-02-10","2022-02-11","2022-02-14","2022-02-15","2022-02-16","2022-02-17","2022-02-18","2022-02-22","2022-02-23","2022-02-24","2022-02-25","2022-02-28","2022-03-01","2022-03-02","2022-03-03","2022-03-04","2022-03-07","2022-03-08","2022-03-09","2022-03-10","2022-03-11","2022-03-14","2022-03-15","2022-03-16","2022-03-17","2022-03-18","2022-03-21","2022-03-22","2022-03-23","2022-03-24","2022-03-25","2022-03-28","2022-03-29","2022-03-30","2022-03-31","2022-04-01","2022-04-04","2022-04-05","2022-04-06","2022-04-07","2022-04-08","2022-04-11","2022-04-12","2022-04-13","2022-04-14","2022-04-18","2022-04-19","2022-04-20","2022-04-21","2022-04-22","2022-04-25","2022-04-26","2022-04-27","2022-04-28","2022-04-29","2022-05-02","2022-05-03","2022-05-04","2022-05-05","2022-05-06","2022-05-09","2022-05-10","2022-05-11","2022-05-12","2022-05-13","2022-05-16","2022-05-17","2022-05-18","2022-05-19","2022-05-20","2022-05-23","2022-05-24","2022-05-25","2022-05-26","2022-05-27","2022-05-31","2022-06-01","2022-06-02","2022-06-03","2022-06-06","2022-06-07","2022-06-08","2022-06-09","2022-06-10","2022-06-13","2022-06-14","2022-06-15","2022-06-16","2022-06-17","2022-06-21","2022-06-22","2022-06-23","2022-06-24","2022-06-27","2022-06-28","2022-06-29","2022-06-30","2022-07-01","2022-07-05","2022-07-06","2022-07-07","2022-07-08","2022-07-11","2022-07-12","2022-07-13","2022-07-14","2022-07-15","2022-07-18","2022-07-19","2022-07-20","2022-07-21","2022-07-22","2022-07-25","2022-07-26","2022-07-27","2022-07-28","2022-07-29","2022-08-01","2022-08-02","2022-08-03","2022-08-04","2022-08-05","2022-08-08","2022-08-09","2022-08-10","2022-08-11","2022-08-12","2022-08-15","2022-08-16","2022-08-17","2022-08-18","2022-08-19","2022-08-22","2022-08-23","2022-08-24","2022-08-25","2022-08-26","2022-08-29","2022-08-30","2022-08-31","2022-09-01","2022-09-02","2022-09-06","2022-09-07","2022-09-08","2022-09-09","2022-09-12","2022-09-13","2022-09-14","2022-09-15","2022-09-16","2022-09-19","2022-09-20","2022-09-21","2022-09-22","2022-09-23","2022-09-26","2022-09-27","2022-09-28","2022-09-29","2022-09-30","2022-10-03","2022-10-04","2022-10-05","2022-10-06","2022-10-07","2022-10-10","2022-10-11","2022-10-12","2022-10-13","2022-10-14","2022-10-17","2022-10-18","2022-10-19","2022-10-20","2022-10-21","2022-10-24","2022-10-25","2022-10-26","2022-10-27","2022-10-28","2022-10-31","2022-11-01","2022-11-02","2022-11-03","2022-11-04","2022-11-07","2022-11-08","2022-11-09","2022-11-10","2022-11-11","2022-11-14","2022-11-15","2022-11-16","2022-11-17","2022-11-18","2022-11-21","2022-11-22","2022-11-23","2022-11-25","2022-11-28","2022-11-29","2022-11-30","2022-12-01","2022-12-02","2022-12-05","2022-12-06","2022-12-07","2022-12-08","2022-12-09","2022-12-12","2022-12-13","2022-12-14","2022-12-15","2022-12-16","2022-12-19","2022-12-20","2022-12-21","2022-12-22","2022-12-23","2022-12-27","2022-12-28","2022-12-29","2022-12-30","2023-01-03","2023-01-04","2023-01-05","2023-01-06","2023-01-09","2023-01-10","2023-01-11","2023-01-12","2023-01-13","2023-01-17","2023-01-18","2023-01-19","2023-01-20","2023-01-23","2023-01-24","2023-01-25","2023-01-26","2023-01-27","2023-01-30","2023-01-31","2023-02-01","2023-02-02","2023-02-03","2023-02-06","2023-02-07","2023-02-08","2023-02-09","2023-02-10","2023-02-13","2023-02-14","2023-02-15","2023-02-16","2023-02-17","2023-02-21","2023-02-22","2023-02-23","2023-02-24","2023-02-27","2023-02-28","2023-03-01","2023-03-02","2023-03-03","2023-03-06","2023-03-07","2023-03-08","2023-03-09","2023-03-10","2023-03-13","2023-03-14","2023-03-15","2023-03-16","2023-03-17","2023-03-20","2023-03-21","2023-03-22","2023-03-23","2023-03-24","2023-03-27","2023-03-28","2023-03-29","2023-03-30","2023-03-31","2023-04-03","2023-04-04","2023-04-05","2023-04-06","2023-04-10","2023-04-11","2023-04-12","2023-04-13","2023-04-14","2023-04-17","2023-04-18","2023-04-19","2023-04-20","2023-04-21","2023-04-24","2023-04-25","2023-04-26","2023-04-27","2023-04-28","2023-05-01","2023-05-02","2023-05-03","2023-05-04","2023-05-05","2023-05-08","2023-05-09","2023-05-10","2023-05-11","2023-05-12","2023-05-15","2023-05-16","2023-05-17","2023-05-18","2023-05-19","2023-05-22","2023-05-23","2023-05-24","2023-05-25","2023-05-26","2023-05-30","2023-05-31","2023-06-01","2023-06-02","2023-06-05","2023-06-06","2023-06-07","2023-06-08","2023-06-09","2023-06-12","2023-06-13","2023-06-14","2023-06-15","2023-06-16","2023-06-20","2023-06-21","2023-06-22","2023-06-23","2023-06-26","2023-06-27","2023-06-28","2023-06-29","2023-06-30","2023-07-03","2023-07-05","2023-07-06","2023-07-07","2023-07-10","2023-07-11","2023-07-12","2023-07-13","2023-07-14","2023-07-17","2023-07-18","2023-07-19","2023-07-20","2023-07-21","2023-07-24","2023-07-25","2023-07-26","2023-07-27","2023-07-28","2023-07-31","2023-08-01","2023-08-02","2023-08-03","2023-08-04","2023-08-07","2023-08-08","2023-08-09","2023-08-10","2023-08-11","2023-08-14","2023-08-15","2023-08-16","2023-08-17","2023-08-18","2023-08-21","2023-08-22","2023-08-23","2023-08-24","2023-08-25","2023-08-28","2023-08-29","2023-08-30","2023-08-31","2023-09-01","2023-09-05","2023-09-06","2023-09-07","2023-09-08","2023-09-11","2023-09-12","2023-09-13","2023-09-14","2023-09-15","2023-09-18","2023-09-19","2023-09-20","2023-09-21","2023-09-22","2023-09-25","2023-09-26","2023-09-27","2023-09-28","2023-09-29","2023-10-02","2023-10-03","2023-10-04","2023-10-05","2023-10-06","2023-10-09","2023-10-10","2023-10-11","2023-10-12","2023-10-13","2023-10-16","2023-10-17","2023-10-18","2023-10-19","2023-10-20","2023-10-23","2023-10-24","2023-10-25","2023-10-26","2023-10-27","2023-10-30","2023-10-31","2023-11-01","2023-11-02","2023-11-03","2023-11-06","2023-11-07","2023-11-08","2023-11-09","2023-11-10","2023-11-13","2023-11-14","2023-11-15","2023-11-16","2023-11-17","2023-11-20","2023-11-21","2023-11-22","2023-11-24","2023-11-27","2023-11-28","2023-11-29","2023-11-30","2023-12-01","2023-12-04","2023-12-05","2023-12-06","2023-12-07","2023-12-08","2023-12-11","2023-12-12","2023-12-13","2023-12-14","2023-12-15","2023-12-18","2023-12-19","2023-12-20","2023-12-21","2023-12-22","2023-12-26","2023-12-27","2023-12-28","2023-12-29"],"y":[1.0,0.999665,0.980469,0.979548,0.975676,0.974461,0.983337,0.985996,0.97241,0.972808,0.95558,0.945657,0.935191,0.916832,0.920726,0.909485,0.907203,0.902723,0.925143,0.941806,0.948169,0.95738,0.934877,0.939273,0.936258,0.943962,0.957778,0.94057,0.922024,0.919009,0.93383,0.934877,0.914907,0.908982,0.899228,0.883276,0.896569,0.916351,0.914006,0.900086,0.916644,0.91208,0.90467,0.878001,0.871344,0.894706,0.890666,0.879341,0.872915,0.89211,0.911892,0.9233,0.933413,0.933141,0.94406,0.931902,0.945949,0.950569,0.95733,0.969173,0.963189,0.948364,0.951052,0.959199,0.947083,0.937613,0.942338,0.939818,0.923754,0.920332,0.930873,0.919282,0.91966,0.934505,0.933812,0.919848,0.894609,0.899795,0.873736,0.876193,0.898325,0.865127,0.870335,0.874324,0.90095,0.868928,0.863741,0.836087,0.838018,0.824706,0.823844,0.843541,0.840118,0.8574,0.822837,0.817797,0.818154,0.833462,0.8271,0.834407,0.851079,0.871973,0.86708,0.860067,0.876445,0.862062,0.864686,0.872981,0.863489,0.842953,0.818511,0.787434,0.785061,0.796253,0.7699,0.77156,0.790983,0.789549,0.797288,0.822637,0.819495,0.80275,0.802097,0.79558,0.803995,0.805513,0.808233,0.820338,0.819664,0.8103,0.80313,0.798912,0.796972,0.812198,0.805492,0.827256,0.832528,0.841006,0.833203,0.834215,0.824345,0.845751,0.856358,0.868843,0.86627,0.860555,0.874031,0.87344,0.871964,0.870952,0.867494,0.885714,0.885714,0.900709,0.90442,0.906192,0.89976,0.902375,0.890249,0.871711,0.869602,0.872386,0.884702,0.854756,0.849104,0.839783,0.833393,0.836008,0.827192,0.824071,0.838876,0.844359,0.857476,0.866692,0.829006,0.832169,0.822722,0.816445,0.822777,0.813332,0.799145,0.792432,0.779155,0.771447,0.769478,0.784618,0.768229,0.756349,0.776318,0.800373,0.79851,0.790272,0.768229,0.762363,0.757535,0.755036,0.774962,0.757302,0.776762,0.785889,0.78032,0.773777,0.79258,0.802279,0.81509,0.808949,0.804629,0.823772,0.817822,0.814243,0.793809,0.785635,0.796943,0.804566,0.808907,0.792242,0.835779,0.843868,0.836689,0.843825,0.837388,0.834826,0.838616,0.835567,0.846811,0.852147,0.851957,0.838362,0.836922,0.863286,0.86265,0.861655,0.846154,0.833957,0.832539,0.839061,0.832793,0.844799,0.851194,0.845752,0.825064,0.815323,0.808409,0.809515,0.82162,0.809898,0.814557,0.811345,0.801261,0.815685,0.813536,0.810111,0.816365,0.807048,0.825555,0.825087,0.830873,0.841382,0.844445,0.847721,0.846168,0.832809,0.826746,0.842148,0.852253,0.851338,0.851657,0.861017,0.862995,0.852167,0.864697,0.873887,0.886608,0.877184,0.871823,0.883226,0.873568,0.865995,0.868016,0.878205,0.877801,0.880652,0.868526,0.866356,0.848976,0.847806,0.852316,0.843211,0.846083,0.842956,0.839723,0.846253,0.859825,0.860421,0.847232,0.848615,0.832958,0.820939,0.819769,0.83332,0.828108,0.842637,0.832784,0.840792,0.851832,0.837311,0.839575,0.845084,0.846665,0.844764,0.857042,0.862061,0.874211,0.877542,0.872674,0.870389,0.873784,0.874681,0.874916,0.87135,0.882924,0.880767,0.883927,0.884504,0.884354,0.879528,0.880212,0.88113,0.867143,0.86347,0.88066,0.888177,0.88728,0.877308,0.871286,0.865114,0.88113,0.881365,0.8775,0.8816,0.880062,0.878909,0.881941,0.876047,0.886682,0.895223,0.893921,0.894284,0.884248,0.877841,0.885443,0.89691,0.897252,0.892277,0.900754,0.91378,0.912029,0.914015,0.910855,0.916364,0.918008,0.926336,0.932444,0.933554,0.945128,0.941908,0.937022,0.932221,0.935586,0.928513,0.924719,0.934857,0.935329,0.939015,0.950096,0.951189,0.949775,0.942337,0.939958,0.942337,0.948338,0.955969,0.963556,0.962956,0.966299,0.97348,0.975645,0.969171,0.969171,0.973501,0.976159,0.976309,0.969836,0.979331,0.981196,0.978388,0.964778,0.962013,0.957662,0.966021,0.96182,0.95539,0.955733,0.955176,0.960449,0.94926,0.942294,0.935114,0.935564,0.941651,0.939101,0.94956,0.9364,0.943001,0.948982,0.962699,0.966664,0.965249,0.96705,0.96287,0.956397,0.953461,0.954897,0.961177,0.955904,0.957019,0.965271,0.953641,0.9542,0.952221,0.943467,0.927873,0.925787,0.92968,0.916022,0.916387,0.9217,0.919464,0.919098,0.906795,0.913398,0.913054,0.923894,0.929809,0.934649,0.938477,0.932756,0.92811,0.937875,0.937832,0.925335,0.917205,0.905934,0.904364,0.911182,0.898105,0.887351,0.883328,0.893889,0.899503,0.909096,0.926518,0.934971,0.937122,0.939789,0.940477,0.933143,0.947704,0.946801,0.96517,0.967213,0.968396,0.969601,0.977064,0.974935,0.978699,0.979301,0.977537,0.978505,0.977817,0.981667,0.987474,0.982291,0.982097,0.97814,0.985603,0.98984,0.993691,0.998229,1.01199,1.01524,1.01357,1.01927,1.02547,1.01126,1.02085,1.0229,1.02722,1.02908,1.02947,1.02649],"sx":[70.08,70.73,71.38,72.03,72.68,74.63,75.28,75.93,76.58,77.23,79.82,80.47,81.12,81.77,83.72,84.37,85.02,85.67,86.32,88.27,88.92,89.57,90.22,90.87,92.82,93.47,94.12,94.77,95.42,97.37,98.02,98.67,99.32,99.97,102.57,103.22,103.87,104.52,106.47,107.12,107.77,108.42,109.06,111.01,111.66,112.31,112.96,113.61,115.56,116.21,116.86,117.51,118.16,120.11,120.76,121.41,122.06,122.71,124.66,125.31,125.96,126.61,127.26,129.21,129.86,130.51,131.16,131.81,133.76,134.41,135.06,135.71,138.31,138.96,139.61,140.25,140.9,142.85,143.5,144.15,144.8,145.45,147.4,148.05,148.7,149.35,150.0,151.95,152.6,153.25,153.9,154.55,156.5,157.15,157.8,158.45,159.1,161.05,161.7,162.35,163.0,163.65,166.25,166.9,167.55,168.2,170.15,170.8,171.44,172.09,172.74,174.69,175.34,175.99,176.64,177.29,179.89,180.54,181.19,181.84,183.79,184.44,185.09,185.74,186.39,188.99,189.64,190.29,190.94,192.89,193.54,194.19,194.84,195.49,197.44,198.09,198.74,199.39,200.04,201.99,202.63,203.28,203.93,204.58,206.53,207.18,207.83,208.48,209.13,211.08,211.73,212.38,213.03,213.68,215.63,216.28,216.93,217.58,218.23,220.18,220.83,221.48,222.13,222.78,224.73,225.38,226.03,226.68,227.33,229.93,230.58,231.23,231.88,233.82,234.47,235.12,235.77,236.42,238.37,239.02,239.67,240.32,240.97,242.92,243.57,244.22,244.87,245.52,247.47,248.12,248.77,249.42,250.07,252.02,252.67,253.32,253.97,254.62,256.57,257.22,257.87,258.52,259.17,261.12,261.77,262.42,263.07,263.72,265.66,266.31,266.96,267.61,268.26,270.21,270.86,271.51,272.16,272.81,274.76,275.41,276.06,276.71,277.36,279.31,279.96,280.61,281.91,283.86,284.51,285.16,285.81,286.46,288.41,289.06,289.71,290.36,291.01,292.96,293.61,294.26,294.91,295.56,297.5,298.15,298.8,299.45,300.1,302.7,303.35,304.0,304.65,307.25,307.9,308.55,309.2,311.15,311.8,312.45,313.1,313.75,316.35,317.0,317.65,318.3,320.25,320.9,321.55,322.2,322.85,324.8,325.45,326.1,326.75,327.4,329.34,329.99,330.64,331.29,331.94,333.89,334.54,335.19,335.84,336.49,339.09,339.74,340.39,341.04,342.99,343.64,344.29,344.94,345.59,347.54,348.19,348.84,349.49,350.14,352.09,352.74,353.39,354.04,354.69,356.64,357.29,357.94,358.59,359.23,361.18,361.83,362.48,363.13,363.78,365.73,366.38,367.03,367.68,370.28,370.93,371.58,372.23,372.88,374.83,375.48,376.13,376.78,377.43,379.38,380.03,380.68,381.33,381.98,383.93,384.58,385.23,385.88,386.53,388.48,389.13,389.78,390.42,391.07,393.02,393.67,394.32,394.97,395.62,397.57,398.22,398.87,399.52,400.17,402.77,403.42,404.07,404.72,406.67,407.32,407.97,408.62,409.27,411.22,411.87,412.52,413.17,413.82,416.42,417.07,417.72,418.37,420.32,420.97,421.61,422.26,422.91,424.86,426.16,426.81,427.46,429.41,430.06,430.71,431.36,432.01,433.96,434.61,435.26,435.91,436.56,438.51,439.16,439.81,440.46,441.11,443.06,443.71,444.36,445.01,445.66,447.61,448.26,448.91,449.56,450.21,452.16,452.8,453.45,454.1,454.75,456.7,457.35,458.0,458.65,459.3,461.25,461.9,462.55,463.2,463.85,466.45,467.1,467.75,468.4,470.35,471.0,471.65,472.3,472.95,474.9,475.55,476.2,476.85,477.5,479.45,480.1,480.75,481.4,482.05,483.99,484.64,485.29,485.94,486.59,488.54,489.19,489.84,490.49,491.14,493.09,493.74,494.39,495.04,495.69,497.64,498.29,498.94,499.59,500.24,502.19,502.84,503.49,504.14,504.79,506.74,507.39,508.04,508.69,509.34,511.29,511.94,512.59,513.24,513.89,515.83,516.48,517.13,518.43,520.38,521.03,521.68,522.33,522.98,524.93,525.58,526.23,526.88,527.53,529.48,530.13,530.78,531.43,532.08,534.03,534.68,535.33,535.98,536.63,539.23,539.88,540.53,541.18],"sy":[113.1,113.22,119.88,120.2,121.55,121.97,118.89,117.96,122.68,122.54,128.53,131.97,135.61,141.98,140.63,144.53,145.32,146.88,139.09,133.31,131.1,127.9,135.71,134.19,135.23,132.56,127.76,133.74,140.18,141.22,136.08,135.71,142.65,144.71,148.09,153.63,149.02,142.15,142.96,147.8,142.05,143.63,146.2,155.46,157.78,149.66,151.07,155.0,157.23,150.57,143.7,139.73,136.22,136.32,132.53,136.75,131.87,130.27,127.92,123.8,125.88,131.03,130.1,127.27,131.48,134.76,133.12,134.0,139.58,140.77,137.1,141.13,141.0,135.84,136.08,140.93,149.7,147.9,156.95,156.09,148.41,159.94,158.13,156.74,147.5,158.62,160.42,170.02,169.35,173.97,174.27,167.43,168.62,162.62,174.62,176.37,176.25,170.93,173.14,170.6,164.81,157.56,159.26,161.69,156.0,161.0,160.09,157.21,160.5,167.64,176.12,186.91,187.74,183.85,193.0,192.43,185.68,186.18,183.49,174.69,175.78,181.6,181.82,184.09,181.16,180.64,179.69,175.49,175.72,178.97,181.46,182.93,183.6,178.31,180.64,173.09,171.26,168.31,171.02,170.67,174.1,166.66,162.98,158.64,159.54,161.52,156.84,157.05,157.56,157.91,159.11,152.79,152.79,147.58,146.29,145.68,147.91,147.0,151.21,157.65,158.38,157.41,153.14,163.54,165.5,168.74,170.95,170.05,173.11,174.19,169.05,167.15,162.59,159.39,172.48,171.38,174.66,176.84,174.64,177.92,182.85,185.18,189.79,192.47,193.15,187.89,193.58,197.71,190.77,182.42,183.07,185.93,193.58,195.62,197.3,198.16,191.25,197.38,190.62,187.45,189.38,191.66,185.13,181.76,177.31,179.44,180.94,174.3,176.36,177.6,184.7,187.54,183.61,180.97,179.46,185.24,170.13,167.32,169.81,167.33,169.57,170.46,169.14,170.2,166.3,164.44,164.51,169.23,169.73,160.57,160.8,161.14,166.52,170.76,171.25,168.99,171.16,166.99,164.77,166.66,173.85,177.23,179.63,179.25,175.04,179.11,177.5,178.61,182.11,177.1,177.85,179.04,176.87,180.1,173.68,173.84,171.83,168.18,167.12,165.98,166.52,171.16,173.26,167.91,164.41,164.72,164.61,161.36,160.68,164.44,160.08,156.89,152.48,155.75,157.61,153.65,157.0,159.63,158.93,155.39,155.53,154.54,158.75,159.51,165.54,165.95,164.38,167.55,166.55,167.63,168.76,166.49,161.78,161.57,166.15,165.67,171.11,175.28,175.69,170.98,172.79,167.74,171.17,168.39,164.55,169.59,168.81,166.89,166.35,167.01,162.74,161.0,156.78,155.62,157.31,158.11,156.93,156.62,156.54,157.77,153.76,154.5,153.41,153.21,153.26,154.93,154.7,154.38,159.24,160.51,154.54,151.93,152.24,155.71,157.8,159.94,154.38,154.3,155.64,154.21,154.75,155.15,154.1,156.14,152.45,149.48,149.94,149.81,153.3,155.52,152.88,148.9,148.78,150.51,147.56,143.04,143.65,142.96,144.06,142.14,141.57,138.68,136.56,136.17,132.15,133.27,134.97,136.64,135.47,137.92,139.24,135.72,135.56,134.28,130.43,130.05,130.54,133.12,133.95,133.12,131.04,128.39,125.76,125.96,124.8,122.31,121.56,123.81,123.81,122.3,121.38,121.33,123.57,120.28,119.63,120.6,125.33,126.29,127.8,124.9,126.36,128.59,128.47,128.67,126.83,130.72,133.14,135.63,135.48,133.36,134.25,130.62,135.19,132.89,130.82,126.05,124.68,125.17,124.54,125.99,128.24,129.26,128.76,126.58,128.41,128.03,125.16,129.2,129.0,129.69,132.73,138.15,138.87,137.52,142.26,142.13,140.29,141.07,141.19,145.47,143.17,143.29,139.53,137.47,135.79,134.46,136.45,138.06,134.67,134.69,139.03,141.85,145.76,146.31,143.94,148.48,152.22,153.61,149.95,148.0,144.67,138.62,135.68,134.93,134.01,133.77,136.32,131.26,131.57,125.2,124.49,124.07,123.66,121.06,121.8,120.5,120.29,120.9,120.56,120.8,119.47,117.45,119.25,119.32,120.69,118.1,116.63,115.29,113.72,108.93,107.81,108.39,106.41,104.26,109.19,105.86,105.15,103.65,103.0,102.87,103.9]}]}
2026-10-15T23:34:22.416730
image/svg+xml
Matplotlib v3.11.2, https://matplotlib.org/
2022-01
2022-04
2022-07
2022-10
2023-01
2023-04
2023-07
2023-10
2024-01
Date
0.8
0.9
1.0
1.1
1.2
Value of 1 dollar invested at the start of 2022
Weights chosen on 2019 to 2021, then run on 2022 to 2023, against equal weights
Sharpe-maximising weights from 2019 to 2021
equal weights, 20% each
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. AAPL’s 37.8% a year is what
happened in 2019 to 2023, not what anyone could have forecast in 2018, and nobody should expect
it to repeat. And the optimiser takes your guesses completely literally.
I changed one input: AAPL expected to return 32.8% instead of 37.8%, still a great stock.
Everything else the same.
Item SPY AAPL JPM XOM GLD Original best mix 0% 53% 0% 5% 42% After −5 points on AAPL 0% 40% 3% 7% 50%
A five-point change in a number nobody can forecast to five points moved an eighth of the
portfolio. Nudge JPM’s return up by two points instead and JPM goes from 0% to 7%. 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, AAPL, JPM, XOM, GLD
r = ( prices / prices . shift ( 1 ) - 1 ). dropna () # daily returns
mu = ( r . mean () * 252 ). to_numpy () # expected yearly returns (the five-year 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 (53% AAPL, 42% GLD, 5% XOM) with its Sharpe of about 1.20, return 25.3%
and risk 19.3%, then the lowest-risk mix (70% GLD, 22% SPY, 7% JPM) at 12.7%. dirichlet draws
random weights that are never negative and always add up to 1. einsum("ij,jk,ik->i", ...)
computes w ⊤ Σ w w^\top \Sigma w w ⊤ Σ 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
Idea Formula Remember it as Portfolio return w ⊤ μ \key{w^\top} \good{\mu} w ⊤ μ weighted average Portfolio risk w ⊤ Σ w \sqrt{\key{w^\top} \risk{\Sigma} \key{w}} w ⊤ Σ w correlations decide how much cancels Efficient frontier best return for each level of risk the upper-left edge of the cloud Minimum variance Σ − 1 1 / 1 ⊤ Σ − 1 1 \risk{\Sigma^{-1}}\mathbf{1} / \mathbf{1}^\top\risk{\Sigma^{-1}}\mathbf{1} Σ − 1 1 / 1 ⊤ Σ − 1 1 (shorts allowed)needs no return forecasts Max Sharpe max ( w ⊤ μ − r f ) / w ⊤ Σ w (\key{w^\top}\good{\mu} - r_f)/\sqrt{\key{w^\top}\risk{\Sigma} \key{w}} ( w ⊤ μ − r f ) / w ⊤ Σ w where the line from cash touches the cloud Capital market line r f + Sharpe × σ r_f + \text{Sharpe} \times \risk{\sigma} r f + Sharpe × σ one risky mix, plus or minus cash The catch outputs swing with small input changes bad forecasts in, confident nonsense out
The series map puts the series’ ten ideas on one page.
References
Philip J. Romero and Tucker Balch, What Hedge Funds Really Do: An Introduction to Portfolio Management (Business Expert Press, 2014), chapter 10: modern portfolio theory, the efficient frontier and the optimisation problem
Harry Markowitz, “Portfolio Selection”, The Journal of Finance 7(1), 77–91, 1952
Richard O. Michaud, “The Markowitz Optimization Enigma: Is ‘Optimized’ Optimal?”, Financial Analysts Journal 45(1), 31–42, 1989