For the S&P 500 I simply compare against investment grade corporate bond yields. In 2018 corporate bonds paid far more than the earnings yield on the S&P 500. This shifted in 2019 when corporate bond yields plummeted. Since October 2019 the S&P 500 earnings yield has been better than investment grade corporate bond yields. But it's trading at 25x earnings. This is historically high, but interest rates are also historically low.
I'm not timing as much as I save nearly $100k a year, so I have to allocate it somewhere. I don't just blindly buy the S&P 500 regardless of price. I made that mistake in the late 1990s before switching to preferred to get me through the first decade of the 2000s.
With nominal GDP at best at 5% annualized and the S&P 500 at 25x earnings, I don't see how anyone can make more than 5% annualized over the next decade. I'm looking for alternative places to put cash. I'm already at my 10% allocation for REITs.