From my understanding CAPM aka Capital Asset Pricing Model is a model which shows both the risk and return and the relationship between them. As, a stock will never show how it is going to contribute to the risk and return so CAPM works like a portfolio in this case. Here the ER is risk free rate based on how the security takes systematic risks.