When the P/E is 20, for example, the earnings yield is 1/20, or 5 percent. An investor who owns the S&P 500 Index could think of it as a low-grade long-term bond, comparing the earnings yield of this “bond” to the total return from some benchmark for actual bonds, such as long-term Treasuries or corporates of a particular quality grade.
If you truly want to compare E/P to bond yields (does literally doing so make sense?), do you look at twelve month trailing earnings? And does volatility of the two asset classes affect price you should be willing to pay? Seems it should.