Over the last two years, the market's climb as seemed unstoppable. Every challenge from inflation, rising Treasury yields, and geopolitical tensions has been met with resilient investors buying the dip and taking valuations higher and higher.

Part of this has been fueled by the screaming-high valuations of the "Magnificent Seven" stocks, driven by bullish bets on artificial intelligence (AI) and its potential to disrupt nearly every aspect of life. Although many analysts believe the bull rush can continue in 2025, the stock market has now breached a critical level, something that's occurred only six times in history.

And history couldn't be more clear about what happens next.

The stock market is toeing a dangerous line

Investors frequently draw on historical patterns and data to try to forecast what might happen in the future. One of these data points for the stock market is called the S&P 500's (^GSPC 0.53%) Shiller price-to-earnings (P/E) ratio, or the CAPE ratio.

Yale Professor Robert Shiller popularized the CAP ratio, which looks at the price of the S&P 500 divided by its average 10-year inflation-adjusted earnings. The ratio uses earnings over a decade to smooth out volatility and irregularities. A higher CAPE ratio tells investors the market may be overvalued, while a lower CAPE ratio may be a signal to investors to buy stocks, similarly to how one might evaluate a single company using the P/E ratio.

Here is the S&P 500 CAPE ratio dating all the way back to 1890.

S&P 500 Shiller CAPE Ratio Chart

Data by YCharts.

As you can see, the average Shiller CAPE ratio is 17.7. But as of this writing, the ratio has risen to the dangerously high level of 37.9. The all-time high CAPE ratio of 44.2 occurred right before the dot-com crash. In fact, the CAPE ratio has only breached 30 six times in 134 years, and those instances were usually followed by a market crash.

  • 1929: The CAPE ratio surpassed 30 in 1929 and was followed by two epic crashes in the stock market known as Black Monday and Black Tuesday on Oct. 28 and 29. The Dow Jones Industrial Average (^DJI 0.92%) fell 25% in those two days and kicked off the Great Depression, a very difficult period for the American economy and stock market.
  • Mid-1997 to 1999: The CAPE ratio hit a staggering level of 44.2 right around the turn of the century and in the lead-up to the dot-com crash. The stock market surged in the back half of the 1990s as investor exuberance raged over the advent of the internet. However, the market clearly got ahead of itself.
  • Late 2017 to late 2018: The market spent the last few months of 2017 and most of 2018 trading with a CAPE ratio above 30. Things fell apart after the first Trump administration began announcing tariffs and started a trade war with China.
  • Early 2020: The CAPE ratio surpassed 30 in early 2020, right before the COVID-19 pandemic essentially shut down the economy for months at a time, leading to a short-lived bear market.
  • Mid-2020 to June 2022: The CAPE ratio traded above 30 for nearly two years, riding a big rally following the worst months of the pandemic due to ultra-low interest rates and various stimulus policies. Eventually, the Federal Reserve realized it was behind the ball on inflation and began hiking rates intensely.
  • Late 2023 to present: The CAPE ratio has now been above 30 since the end of 2023 as the market's two-year bull run has raged thanks to AI, the prospect of lower interest rates, and now Trump's presidency.

Uncharted territory

The CAPE ratio had only risen above 30 three times prior to 2020. Since then, it's been more often than not for the market to trade with a high CAPE ratio. Past performance is no crystal ball, though, and that rings especially true today given how long the CAPE ratio has been elevated.

Obviously, the market doesn't just immediately crash when the CAPE ratio surpasses 30. In the past, the ratio has run at elevated levels for years like in the 1990s, in 2020 to 2022, and today.

The environment today has many parallels to the dot-com era in that investors were extremely excited by the growth and opportunities the internet would bring. AI is having a similar effect on the economy, and many investors also cite Trump and his pro-business policies as powerful tailwinds. While no one can know when this historic run will end, it's important for investors to understand this historical context so they are better prepared for the future, even if things may not play out in exactly the same manner.