The S&P 500 has soared over the past three years amid expectations that artificial intelligence (AI) will represent the next big moment in technology. Investors rushed to get in on these stocks and other growth players, and that helped the index climb 78% over the three calendar years. The first quarter marked a pause in this momentum as investors worried about turmoil in Iran as well as the rapidity and depth of tech companies' AI spending -- but in recent weeks, the positive movement has returned.
Investors are optimistic that a resolution in Iran is on the way, and strong earnings reports from tech companies and comments about high demand for AI have eased concerns about the long-term AI story. All of this has boosted the performance of stocks and the major indexes.
In fact, the S&P 500 just did something for the first time in nearly 30 years. And history says this may happen next.
Image source: Getty Images.
AI stocks drive gains
Before we take a look at the S&P 500's move, though, let's dive deeper into the index's ups and downs over the past year or so. As mentioned, AI stocks have driven much of the gain. Investors rushed to get in on these players during the early days of the AI story to fully benefit as the technology developed. During this stage, customers turned to AI companies such as chip giant Nvidia and cloud player Alphabet to access the capacity needed to train their large language models. These companies were among the first winners of the AI boom, as they very quickly generated revenue from their AI investments.
Meanwhile, this boom has also required significant investment to keep up with demand and bring AI to the next level of real-world use. Companies have spent billions of dollars on AI as part of this. For example, this year alone, tech giants aim to fork over nearly $700 billion to build out infrastructure. This, along with high valuations of many AI stocks, worried investors late last year and in the early part of this year -- the concern was that demand and the revenue opportunity wouldn't justify such spending.

SNPINDEX: ^GSPC
Key Data Points
The message from earnings reports
But the recent earnings season helped turn things around for AI stocks and other growth players. The message seemed to be universal: Demand for AI continues to soar. At the same time, earnings results also lifted investor optimism. The Magnificent Seven tech companies and the rest of the S&P 500 reported their highest growth rates since 2021, at more than 63% and 17%, respectively, earnings analyst John Butters of FactSet wrote in a note.
Now, let's consider the rare move made by the S&P 500 in recent times... The index just posted its biggest eight-week winning streak since June of 1997, according to Ryan Detrick, chief market strategist at Carson Investment Research. The S&P 500 completed an eight-week run, gaining 17.3% as of May 22, the data show, compared to the 17.4% increase in 1997.
What happened in the 52 weeks following that 1997 winning streak? The S&P 500 went on to gain more than 22%, Carson research shows. In fact, in five of the six winning streaks spanning eight to 12 weeks dating back to 1955, the S&P 500 has gone on to deliver a double-digit gain in the year to follow.
So, history is clear about what happens next: After this recent streak, the S&P 500 may climb in the double digits over the coming year.
What may interfere with history
It's important to keep in mind, however, that history isn't always right. Negative news from key companies, economic weakness, or geopolitical events, for example, could weigh on stocks and the market in general -- and disrupt the pattern. Still, it's useful to look at history to offer us a general idea of what commonly has happened in the past, and in this case, history offers us very positive news.
But the best news of all is the following: Over time, the S&P 500 always has advanced, so no matter what direction the index takes, patient investors are likely to gain by holding on to quality stocks for the long term.





