How the math works
Prices are adjusted closes, so splits and dividends are in the series. Daily simple returns are price today over price yesterday, minus one.
Arithmetic return is 252 times the average daily return. Volatility is the sample standard deviation of those daily returns, times the square root of 252. Covariance uses the same sample, divided by n − 1, then scaled by 252. Sharpe is that arithmetic return minus the risk-free rate, divided by volatility.
Every optimized portfolio is long only and fully invested. No shorts, no leverage inside the risky mix. Minimum variance is the calmest mix. The frontier walks target returns from that mix up to the single name with the highest sample return, minimizing variance at each stop. Max Sharpe searches the same simplex from several starting points.
The cloud is 1,800 draws from a uniform distribution on the simplex, so every fully invested long-only mix was equally likely. The capital market line is combinations of cash at the risk-free rate and the max-Sharpe portfolio.
Sample means are a weak forecast. Minimum variance ignores them and is usually the more stable of the two optimizers out of sample. Read max Sharpe as a description of this window, not a recommendation.