CAPM and Cost of Capital
So I've started to study up on DCF valuation. I get the basics, however, why is CAPM used to estimate the cost of capital? I thought that empirical studies show that CAPM is a poor way of estimating returns. So the difference between companies is beta, which is the relative systematic risk compared to the market. Where does CAPM take into account liquidity, leverage, threat of substitutes etc? I guess my question is, is there a different way to estimate the cost of capital?