# Does the discounted dividend model assume a stock underperforms the risk-free rate?

I'm trying to understand intuitively why the stock market as a whole has outperforms the risk-free rate over time. I started by looking at the discounted dividend model which is one of the few things I remember from academic courses a long time ago.

Consider a stock that just paid a dividend $$D$$. If we assume a constant discount rate $$r$$ and a constant growth rate $$g$$, the discounted dividend model tells us that the present value of the stock should be

$$P=\frac{D(1+g)}{r-g}.$$

The math behind how to get here is simple, but I'm wondering what this model even tells us. For the model to make sense we have to have $$r>g$$. But if that were true then why would you hold such a stock? Wouldn't it make more sense to continuously invest in the risk-free rate?

There must be something I'm missing. Any guidance or intuition is greatly appreciated.

No, note $$r$$ is not risk free rate. In Gordon growth model (i.e. the model your equation describes) $$r$$ is the company's cost of capital/equity not the risk free rate. You can read about it straight from the horse's mouth in the Gordon & Gordon 1997 paper. Hence $$r$$ is the risk free rate plus whatever risk premium the company pays i.e. $$r= r_f+r_i$$ where $$r_f$$ is the risk free rate and $$r_i$$ the risk premium company pays over it.
As a consequence the formula does not say that investor cannot get higher return than risk free rate. Only, if you assume that $$r=r_f$$ that would be true.
Maybe in class your professor used $$r=r_f$$ as a simplifying assumption, but that is clearly not something inherent to Gordon growth model and the $$r$$ in your formula will realistically be high above true risk free rate.