It was only a few months ago that investors were worried about a bear market and a wide-scale sell-off. Those fears are long gone, and with June wrapped up and the first six months of 2025 in the books, the stock market has been looking solid. The S&P 500 (^GSPC 0.83%), an index that tracks the 500 leading stocks on U.S. exchanges, is up 5.5% through the first six months of the year. In doing so, it has hit a new all-time high.

That is great news, but it also might have you thinking about whether this is still a good time to invest in the stock market. There is, after all, still the threat of tariffs and trade wars out there. Some analysts also worry about a possible recession. In light of all these things, has the stock market become overheated, and is it too late to invest in the S&P 500? Should you wait for a pullback?

Person looking at charts on papers and laptop.

Image source: Getty Images.

Valuations are getting dangerously high

The red-hot stock market has done well, perhaps too well. One way to gauge just how expensive the market is is by looking at the Shiller price-to-earnings (P/E) ratio, which looks at a 10-year period and adjusts for inflation. Currently, the Shiller P/E multiple is just under 38. The last time it was over 38 was in the fall of 2021. The following year, the S&P 500 would fall a staggering 19%.

This doesn't mean that another crash is inevitable, but it highlights just how expensive the market has become. With high valuations come high expectations, and the danger is that declining economic conditions could set investors up for significant losses. Although stocks generally do rise in value over the long term, that doesn't mean there aren't bad years along the way.

Another reason for caution beyond just high valuations is that the full effect of tariffs may not be factored into stocks just yet. There has been a pause on reciprocal tariffs, and many businesses loaded up on inventory in advance to avoid the effect of higher prices. If tariffs have a meaningful effect on profits this year, that could significantly test the stock market. Amid lower earnings numbers, that may put pressure on high-priced stocks and lead to a decline in the S&P 500.

^SPX Chart

^SPX data by YCharts.

Does it make sense to invest in the S&P 500 today?

The risk of a correction does look to be rising. The markets are behaving as if economic conditions are ideal and everything is perfect, when in fact, there is plenty of risk and uncertainty ahead. Speculation is rampant, with new stock issues soaring and Bitcoin hitting record levels. It's reminiscent of what happened a few years ago in 2020 and 2021, when stocks took off and reached overblown valuations.

However, that doesn't mean you need to get out of the stock market. But if you are near retirement (less than five years away), or you think you might need to pull money out of your investments in the short term, now can be a good time to consider rebalancing your portfolio by putting some money into bonds or more value-focused funds, such as the Vanguard Value Index Fund ETF. Moves like this can help you reduce some of your overall risk.

Timing the market, however, generally isn't a sound idea, because over time, the S&P 500 will hit new highs. That alone isn't a reason to worry. That's entirely normal. And valuations can remain elevated for a long time.

Predicting a market crash can be extremely difficult. While it would be great to know that now is the time to get out of stocks, and that you'll wait for a sell-off before buying back in, that's much easier said than done. The smartest investors in the world don't suggest trying to time the market, for good reason. By doing so, you'll miss out on gains, and there's never a guarantee of when a crash might happen.

Investing in the broad market and holding an exchange-traded fund that tracks the S&P 500 can still be a good move, as the market is likely to rise in value over the long term. But if you need to reduce volatility and risk because you may need to access your money in the near term, it can be a good idea to potentially pivot into safer investment options right now.