U.S. stock markets reached record levels on Tuesday as investor concerns over Middle East tensions and artificial intelligence developments eased, driving a broad rally led by technology shares. The S&P 500 climbed 1.8 percent, surpassing its previous high set in early June and marking a nearly 6 percent gain over the past week.

The market’s advance was supported by signs of progress in diplomatic negotiations between Iran and the United States, which have raised hopes for a potential peace agreement. Officials reported advancements in discussions to reopen the Strait of Hormuz, a critical maritime route responsible for transporting about one-fifth of the world’s crude oil. Meanwhile, Secretary of State Marco Rubio acknowledged progress but noted that the talks had yet to reach a conclusion.

Investor sentiment also improved following strong earnings reports from major technology companies, with 86 percent of S&P 500 firms reporting this season beating analysts’ earnings-per-share estimates. This helped offset concerns about the high levels of investment in artificial intelligence infrastructure and potential competition from less expensive AI models developed abroad, particularly in China.

The market had experienced volatility in recent months, influenced by fluctuating expectations regarding Federal Reserve monetary policy, geopolitical developments, and uncertainties surrounding the technology sector. Last week, the Nasdaq Composite index approached correction territory before rebounding sharply, climbing more than 9 percent since last Wednesday.

Adding to market stability, the U.S. Treasury Department intervened in global currency markets to support the Japanese yen, which had recently hit a 40-year low against the dollar amid concerns about Japan’s fiscal policies and rising oil prices. Japan, as a major holder of U.S. Treasury securities, posed a risk that it might liquidate American assets to bolster its currency, a move that could have unsettled U.S. debt markets and heightened volatility in sensitive sectors such as artificial intelligence.

Oil prices declined on Tuesday, falling below $80 a barrel for the first time in three weeks, as investors anticipated a possible de-escalation of conflict in the Middle East. Consequently, average gasoline prices in the United States decreased slightly to $4.09 per gallon.

Market strategists noted that the recent rally may have momentum to continue amid a stable economic backdrop. Scott Rubner, a strategist at Citadel Securities, highlighted that prior market excesses had been largely corrected and expressed hope that investors could now focus more on fundamental economic indicators rather than positioning. Despite lingering inflationary pressures, the broader economy remains robust, contributing to improved investor confidence.