U.S. stocks ended the first half of 2024 up 14% from where they started the year, even as Wall Street investors expressed growing concern about the narrowness of the rally that saw just five stocks lead most of the gains.

The S&P 500's rally was slightly less than it had in the first half of 2023, but it still ranks as one of the strongest performances for the first six months of the year since the dot-com bubble of the late 1990s.

But nearly 60% of the market’s gains so far this year have been driven by just five giants: Nvidia, Microsoft, Amazon, Meta and Apple, all of which have been fueled by investor frenzy over the potential of generative AI. Nvidia alone accounted for 31% of the market’s gains in the first half of the year.

The surge has been less pronounced in recent months, with Nvidia, Apple and Microsoft driving more than 90% of the growth in the second quarter, the Financial Times calculated in a report.

“There are growing signs of weakness developing,” said Kevin Gordon, chief investment strategist at Charles Schwab, according to the report. “It’s not unusual throughout history to see the largest members make big gains in the indices, but when the rest of the market struggles, that’s when the red flags start to appear.”

However, some investors are hoping that underperforming sectors will eventually start to catch up, without technology stocks falling, following the pattern seen briefly in the fourth quarter of last year.

Morgan Stanley Investment Management Portfolio Manager Andrew Slimon spoke about the dominance of artificial intelligence, saying that it has become so exposed that it has left other areas behind, adding: I think there are a lot of companies in areas like industrials and financial services where the business is very good, and yet they have been forgotten.

Slim also expressed optimism that the second-quarter earnings season, which begins in mid-July, should help draw attention to fundamentally strong companies.