The S&P 500 and Nasdaq edged lower in choppy trading on Tuesday as weakness in heavyweight technology stocks offset optimism that the United States and Iran could be nearing an agreement, according to Reuters report.

Pakistan’s Defence Minister Khawaja Asif told Bloomberg News that recent developments suggested a peace deal was close. His remarks followed a statement from Qatar’s foreign ministry that Iran-Oman negotiations over shipping through the Strait of Hormuz were at an advanced stage.

Brent crude futures reversed course after climbing to their highest level in more than a week. Elevated energy prices have renewed inflation concerns and clouded the interest-rate outlook for central banks worldwide.

“When you get some indication of something positive happening—that this war is going to come to an end or some agreement—you start to see oil back off. Any positive news is better than negative news,” Robert Pavlik, senior portfolio manager at Dakota Wealth told Reuters.

At 9:52 a.m. ET, the Dow Jones Industrial Average was up 221.79 points, or 0.41%, at 54,197.77. The S&P 500 was down 2.27 points, or 0.03%, at 7,750.84, while the Nasdaq Composite fell 92.18 points, or 0.35%, to 26,513.18.

Industrials and utilities led gains among S&P 500 sectors, helping offset weakness in heavyweight technology and communication services stocks.

The information technology sector fluctuated between gains and losses. Nvidia rose 1.2%, while Microsoft and Apple declined 0.8% and 1%, respectively.

US inflation data due this week could shape the Federal Reserve’s policy outlook, with traders nearly evenly split on whether it will raise rates or pause in September, according to the CME FedWatch Tool.

The S&P 500 and Dow hovered near record highs while the Nasdaq remained more than 2% below its peak. Strong earnings and signs that AI spending is paying off have supported US stocks.

Cardinal Health rose 5% on an upbeat fiscal 2027 profit forecast, while Riot Platforms jumped 9.5% following a report of a $9 billion deal with Anthropic. Rocket Lab fell 3.5% after indicating a delay to the first flight of its Neutron rocket.

US-listed shares of On tumbled more than 21% after the sportswear brand missed sales estimates. Hims & Hers Health fell 5.5% after reporting a wider-than-expected quarterly loss, while Venture Global slipped about 5% as revenue narrowly missed expectations.

Advancing stocks outnumbered decliners by 1.66 to 1 on the NYSE and 1.45 to 1 on the Nasdaq. The S&P 500 recorded 11 new 52-week highs and one new low, while the Nasdaq Composite posted 48 new highs and 36 new lows.