How to apply the CAPM to 6 stocks from different markets?

I would like to apply the capital asset pricing model (CAPM) for selecting proportions of 6 different stocks. In introductory books, the CAPM model assumes that there is one market index (e.g. the S&P 500) the individual stocks are regressed against.

However, suppose the 6 stocks are from different markets (NASDAQ, NYSE, AMEX) but the same market sector (information technology). How do I determine the efficient frontier and tangency portfolio?

• From the title I assumed you were talking about 6 different countries! The distinction between Nyse, Nasdaq, Amex is not very significant. These are all US stocks and can be modeled with a single US Equity Model (CAPM or multifactor model). – noob2 Jun 21 '16 at 15:02
• The closed form expression for portfolio variance on any portfolio with more than 3 assets is overly complicated. You need to compute the covariance matrix, which can be simplified to the variance of the sum of securities' weights multiplied by logarithmic returns: $\sigma(r_p)^2 = \sigma (\Sigma_i^j w_i r_i)^2$. Select securities weightings which optimizes the efficient frontier (usually the Sharpe ratio). – David Addison Mar 22 '17 at 0:04