The stock market has been cruising during the past 2 1/2 years.
However, it's also been volatile, bouncing back from numerous stumbles.
Investors are worried that the market may have more difficult days ahead.
The S&P 500 (SNPINDEX: ^GSPC) index is enjoying a multi-year run with few parallels in history. The broader benchmark has hit numerous all-time highs in recent years and continues to seem invincible despite what many would have thought were some pretty significant drags.
These include persistently elevated inflation and the Iran war, which has driven up gas prices.
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 »
None of the obstacles has been enough to break the powerful momentum driven by artificial intelligence (AI), which is fueling a large share of economic growth through productivity gains and the hundreds of billions that hyperscalers are collectively spending on AI infrastructure.
After a recent multi-week dip among chip stocks and other AI companies, the market has since bounced back. In fact, the S&P 500 just did something for only the third time in the past three decades. Here's what history says will happen next.
Image source: Getty Images.
It's been an up-and-down year for equity markets and AI, which is now a very concentrated sector in the broader market.
Hyperscalers have committed to making north of $700 billion in capital expenditures this year to continue building out AI infrastructure and potentially more next year. Investors have grown concerned that returns may not justify the spending, particularly as these tech juggernauts start to see their free cash flow deteriorate.
On the other hand, companies that provide infrastructure for the AI supply chain, such as memory providers, have seen their stocks soar this year due to supply constraints. More recently, some of the big AI companies that have had tough years, such as Microsoft, Amazon, and Palantir, turned in strong earnings reports, leading investors to buy the dip.
This, along with a potential resolution of the U.S.-Iran conflict, led to a rebound in the S&P 500, which climbed 5% during the four trading days ended Aug. 4.
Such moves are rare and have occurred only three times in the past three decades: on April 23, 1999; March 21, 2000; and Nov. 9, 2020. Two of these instances, 1999 and 2000, proved to be bad times long-term to buy stocks because investors got hammered multiple times amid the dot-com bubble and subsequent bust.

^SPX data by YCharts
In the third instance, the market kept running strong until 2022, which turned into a bear market. But that came after the COVID-19 pandemic, and there were very different dynamics at play, including tremendous government support.
Many market experts see more similarities now to what happened during the dot-com bubble as the internet was being built out, although there are plenty of differences as well.
The renewed rally is not a time for investors to let their guard down just yet. The rebound could be brief, and there are still plenty of warning signs, suggesting froth in the market.
Retail investors should remain disciplined and stick to a good investment process. This means looking at your investment journey and seeing which phase you are in. If you still have a 10- to 30-year runway, you may not need to change your portfolio at all, as long as you are comfortable with volatility.
If you are nearing retirement, it might be best to focus on capital preservation and a less-risky portfolio that can still grow and keep up with inflation while also having less downside.
If you have a portfolio full of individual stocks, it's also a good idea to look at valuations and think about which ones are reasonable and which face a unbalanced risk-reward proposition. Is it better to own Microsoft at 25 times forward earnings or Palantir at more than 100 times?
Everyone has a different risk profile, and history rarely repeats itself. But the goal is to make sure you are taking calculated risks and not tying too much of your portfolio to a concentrated, high-risk bet.
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 $400,155!* 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,345,502!*
Now, it’s worth noting Stock Advisor’s total average return is 955% — 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.
See the 10 stocks »
*Stock Advisor returns as of August 7, 2026.
Bram Berkowitz has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Amazon, Microsoft, and Palantir Technologies. The Motley Fool has a disclosure policy.