When the price-to-earnings ratio is near all-time highs, as it is now, the S&P 500 delivers annual returns averaging about 5% over the next 20 years.

Many market models are warning investors about the next 10 years. These models are based on fundamentals and in the long run, fundamentals matter.

Over the long run, the average price-to-earnings (P/E) ratio  is about 17. The P/E ratio is a popular way to define the fundamentals of the stock market. When the P/E ratio is high, stocks are considered overvalued. Low P/E ratios are associated with undervalued stocks.

While the average ratio is about 17, the P/E is almost always above or below that value. Over time, researchers found P/E ratios are mean reverting, which means they tend to move above and below the mean (or average). So high values of the P/E ratio are eventually followed by low P/E ratios.

Current S&P 500 Price-to-Earnings Ratio Is Overvalued

This is important because right now the price-to-earnings ratio of the S&P 500 is at a high reading of about 22. The chart below shows how high this is dating back to 2000.

price-to-earnings ratio

The dark blue line shows the P/E ratio based on earnings that companies reported in the past year. The light blue line calculates the P/E ratio using analyst-estimated earnings for the next 12 months. Both readings are back to levels last seen in 2018, before the index fell almost 20%.

P/E ratios offer a roadmap to the future. After all, how long it takes to get somewhere depends on where you start from. Starting from this level, stocks are likely to disappoint over the next 20 years.

When the P/E ratio is near all-time highs, as it is now, the S&P 500 delivers annual returns averaging about 5% over the next 20 years. When the P/E ratio is near all-time lows, returns are about three times higher, averaging 15.4% a year over the next 20 years.

The next chart shows what this means for your retirement.

price-to-earnings ratio

Imagine finding yourself 61% below target at retirement. That’s life changing and could mean working longer than expected.

History tells us the long run will be disappointing, so long-term investors should be cautious.

But there will be short-term trading opportunities. And many opportunities in individual stocks will be rewarding. Unfortunately, index investors are likely to miss their goals.

Right now, you can’t afford to ignore the price-to-earnings ratio.

• Michael Carr is a Chartered Market Technician for Banyan Hill Publishing and the Editor of One Trade, Peak Velocity Trader and Precision Profits. He teaches technical analysis and quantitative technical analysis at New York Institute of Finance. Mr. Carr also is the former editor of the CMT Association newsletter Technically Speaking.

Follow him on Twitter @MichaelCarrGuru.