The stock market continues to roll higher, and the S&P 500 (SNPINDEX: ^GSPC), Nasdaq Composite (NASDAQINDEX: ^IXIC), and Dow Jones Industrial Average (DJINDICES: ^DJI) -- the three most commonly used proxies for market health -- have all notched new highs recently. Although there's been some slight pullback over the past few weeks, all three indexes have delivered strong gains year to date.

^SPX data by YCharts
^SPX data by YCharts

Missed Nvidia in 2009? This Rare Signal Is Flashing Again. In 2009, a "Double Down" signal flashed for a little-known chipmaker called Nvidia. For the first time in years, that same "Total Conviction" signal is flashing for a company 1/100th the size of Nvidia. Continue »

The lower Dow gain and higher Nasdaq gain indicate that the biggest gains are coming from the tech sector, and specifically, artificial intelligence (AI) stocks. However, many value stocks have been performing well, too, as they remain resilient in the face of inflation.

It's the fourth consecutive year of gains, and for the S&P 500, double-digit gains. That wouldn't be alarming if valuations remained constant, but as the market soars, it's also becoming more expensive. That's not sustainable over the long term, and some investors may fear that a crash or correction could be coming soon.

Should you wait for the pullback or invest at the high? History offers a clear answer.

Image source: Getty Images.
Image source: Getty Images.

History has shown, time and time again, that investing through every cycle leads to the best results. Since you can't time the market, you always need to be in the market. This year is an excellent example. The CAPE ratio, which adjusts the S&P 500 average P/E ratio for inflation, is at its second-highest level ever. The average since it's been recorded is 17.8, and it's currently at 41.1.

S&P 500 Shiller CAPE Ratio data by YCharts
S&P 500 Shiller CAPE Ratio data by YCharts

When it peaked at 44 in 2000, the market crashed and lost value for three years in a row. If you're worried about a crash now, you might have wanted to bow out of the market already last year, when the ratio became highly elevated. However, if you had stopped investing at that point, you'd have missed out on the 18% gain the S&P 500 has returned over the past year.

Short of timing the market, which is impossible, your best bet to maximize your investments is to keep investing, even when the market is expensive. Studies show that every rolling 20-year period since 1936 has had a positive return. Further, every 12-year period since 1972 has had a positive return.

That includes bull and bear markets, plus crashes and corrections. As the saying goes, time in the market is better than timing the market. Don't wait for the pullback; instead, be choosy about stocks today and set aside some cash to benefit from bargains when the pullback comes.

Before you buy stock in S&P 500 Index, consider this:

The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and S&P 500 Index wasn't one of them. The 10 stocks that made the cut could produce monster returns in the coming years.

Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you'd have $445,833!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you'd have $1,402,153!*

Now, it's worth noting Stock Advisor's total average return is 993% — a market-crushing outperformance compared to 214% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.

*Stock Advisor returns as of September 4, 2026.

Jennifer Saibil has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.

Should You Buy Stocks Now or Wait for a Pullback? History Offers a Clear Answer was originally published by The Motley Fool