It is known that if the CAPM holds then the E(R) = CAPM predicted return and all securities lie on the SML. However, in each period, there is an error term that is non-zero in every single observation but that is 0 on average (as in any regression) In my view, if the CAPM perfectly holds and we run a regression between the market portfolio and a security, the R square should be 1, however, we would still see deviations from the line of best fit (because of the idiosyncratic risk represented by the error term). However, examples show that if the R square is 100%, then all points are on the line of best fit: .
Is my logic flawed? How would it look graphically if security returns are regressed on the mean-variance efficient market portfolio (theoretically, not empirically)? Wouldn't we see points deviating from the line of best fit (with Beta as slope)?