The S&P 500 and Nasdaq finished out the quarter with their biggest quarterly gains since 2020 as investors remained upbeat about economic and earnings growth even amid the Middle East conflict.
The indexes ended higher for the day as well on Tuesday, with technology .SPLRCT among the biggest sector gainers in the S&P 500.
Optimism over signs of progress in efforts to bring the Iran war to a lasting halt has helped stocks recently despite continued military tensions.
Iran and the U.S. on June 17 signed a memorandum of understanding aimed at ending the four-month-old conflict. But exchanges of fire over the weekend have tested that agreement, and a Qatari official said on Tuesday that top U.S. envoys who have arrived in Doha will not hold a high-level meeting with Iran.
"We've had a great first half of the year, certainly better than most expected," said Oliver Pursche, senior vice president and advisor for Wealthspire Advisors in Westport, Connecticut.
"In spite of all the geopolitical stuff, the U.S. economy is performing well and corporate earnings are strong."
After a strong first-quarter earnings season for S&P 500 companies, investors are looking forward to second-quarter results in the coming weeks.
According to preliminary data, the S&P 500 .SPX gained 55.97 points, or 0.75%, to end at 7,498.38 points, while the Nasdaq Composite .IXIC gained 374.62 points, or 1.45%, to 26,194.76. The Dow Jones Industrial Average .DJI rose 116.17 points, or 0.22%, to 52,298.91.
Weakness in heavyweight technology shares has weighed on the market in recent weeks.
Strategists at BofA said cyclical, value-oriented sectors such as energy and financials could be the better bet heading into the second half.
Worries about possible interest rate hikes have weighed on the market. Traders are pricing in at least one rate hike by the Federal Reserve by the end of 2026, according to data compiled by LSEG.
Nike NKE.N was due to report quarterly results after the bell.
Reuters