I cloned the Global Minimum Variance Portfolio Algo (from Jorge Perez) to get the maximum Sharpe ratio portfolio based on the Markowitz portfolio theory.
For this I have to compute the expected rate of return of stocks. I took beta x 11%. Hence, I added SPY in my list of securities to compute the beta vector.
The maximum Sharpe ratio portfolio corresponds to the second fund in the two-fund theorem (the first being the global minimum variance portfolio) and behaves as the market portfolio.
So if you add a second time SPY in the list of securities the maximum Sharpe ratio portfolio will consist only of SPY!