The S&P 500 closed out its best quarter in six years on Tuesday after stock prices were lifted by a bumper round of corporate earnings and hopes for an end to the war between the United States and Iran.
The S&P 500 rose 14.9 percent for the three months through June, its best quarterly performance since the same period in 2020 when the world was beginning to recover from the worst of the coronavirus pandemic.
The market gains in the second quarter were initially led by the familiar Magnificent 7 group of companies that have been the driving force behind the rally for many years. The group — which consists of Amazon, Apple, Microsoft, Alphabet, Meta, Tesla and Nvidia — rose almost 30 percent from the end of March through to the end of May.
This group is also a proxy for the so-called hyperscalers that are driving the build-out of artificial intelligence infrastructure. These companies have been the beneficiaries of the early investor hype around A.I., but that enthusiasm has also been backed up by the hyperscalers’ strong quarterly earnings.
The gains in the second quarter marked a significant rebound from the start of the year, when the S&P 500 fell by as much as 7 percent after the United States and Iran went to war in late February, disrupting global oil supplies.
Despite an overall strong quarter of gains, investor enthusiasm flagged in June, marking the third month of losses this year. The S&P 500 fell roughly 1 percent during the month, as investors grew increasingly wary over the rapid rise of those companies that had been propelling the market only months before. The Magnificent 7 fell roughly 9 percent for the month, amid concerns about rising costs for computer chips, supply constraints and potential delays on when the hyperscalers might reap the profits of their current investments.
“As innovation matures, we tend to see investors become more discerning,” said Kristina Hooper, chief market strategist at Man Group, a fund manager. “We have hit that point now where investors are more discerning when it comes to the hyperscalers.”
Investors expect the upcoming round of financial results to remain strong, but their attention has turned to some of the smaller companies that are now the beneficiaries of the money being spent by the hyperscalers, like makers of computer chips and industrial construction companies.
The Philadelphia Semiconductor index, a benchmark for chipmakers and other computing companies, rose over 10 percent in June and has doubled in value since the end of March.
Heading into the second half of the year, many stock analysts remain optimistic that corporate earnings driven by artificial intelligence will continue to grow, with concerns about the war already moving to the back burner for investors, said Stuart Keiser, an analyst at Citi.
“The reason we are still confident in the market is the vast majority of the recent recovery was driven by earnings and earnings revisions, and we think that can continue,” he said.
Stock and oil markets have largely shrugged off continued sporadic fighting between Iran and the U.S. but that has nonetheless raised uncertainty about attempts to secure a lasting peace. Both Iran and the United States have said they are sending representatives to Doha, the capital of Qatar, on Tuesday. The two sides were not expected to meet directly.
The price of Brent crude, the global benchmark for oil, inched lower on Tuesday to $72.92 a barrel, hovering around the level it was before the war.
Despite the drop in oil prices, consumer gas prices have also yet to return to pre-war levels. Gas prices fell again on Tuesday, dropping to a national average of $3.85 a gallon, according to the AAA motor club. Still, gas prices have risen 30 percent since the war began.
Over the past week, the estimated flow of oil through the strait has risen to nearly 80 percent of the prewar level, according to analysts at Goldman Sachs. If shipments continue to recover at their recent pace, oil flows from the Persian Gulf could return to the prewar level of 23 million barrels per day in early July, the analysts said.
A setback to shipping traffic last weekend, however, demonstrated the “key risks and constraints for a swift recovery,” they wrote.
The post Stocks Notch Strongest Quarter Since 2020 appeared first on New York Times.




