Stocks on Wall Street fluctuated amid mixed signals about the chances of reaching a deal to end the war in Iran and revive energy flows through the vital Strait of Hormuz.

While stocks remained at record highs, the S&P 500 closed virtually unchanged. US crude settled below $89 a barrel.

In late trading hours, Salesforce Inc. issued a lukewarm forecast. Snowflake Inc. raised its sales projections and signed a multi-year, $6 billion agreement to use Amazon's cloud services and chips.

In a related development, President Donald Trump said he was dissatisfied with the negotiations with Iran, dampening expectations of an imminent breakthrough. The United States also denied an Iranian media report about a draft interim agreement that claimed traffic through the Strait of Hormuz could return to normal within a month of its implementation.

Trump asserted that no country would control the waterway, highlighting a key sticking point in resolving the nearly three-month-long dispute. He did not specify what steps the United States would take to ensure the free passage of ships, and he downplayed the likelihood of easing sanctions on Iran.

Hormuz remains the testing ground for markets

Adam Tornquist of LPL Financial said: The situation surrounding Iran remains highly volatile as negotiations continue towards a more sustainable peace agreement.

He added: A tangible reopening of the Strait of Hormuz is likely to be necessary for oil prices to move to a sustained decline.

US Secretary of State Marco Rubio said that we will see in the next few hours and days whether progress can be made on Iran.

He noted that U.S. Special Envoy Steve Wittkopf, Jared Kushner, and Vice President J.D. Vance were very heavily involved.

Alexander Giuliano of Resonate Wealth Partners believes the stock market has enough confidence that a solution with Iran will eventually emerge, even if not immediately.

He added: Although it appears that stocks have moved too quickly, we saw a normal correction just two months ago, which helped to reset sentiment.

Veteran market strategist Ed Yardeni dismissed concerns that U.S. stocks were in a bubble, saying the recent rally was driven by strong corporate earnings, not speculation. The big difference is earnings, he said on Bloomberg TV's Survivalance program.

Yardeni coined the term FIMO, or Great Earnings Momentum, to distinguish the current rally from FOMO, or Fear of Missing Out, which he described as being based on hope and hype rather than fundamentals.

Strategists at Goldman Sachs Group, led by Ben Snider, said that earnings growth driven by the artificial intelligence boom would fuel further gains in stocks, raising their year-end target for the S&P 500 to 8,000 points. The index closed at 7,520.36 points on Wednesday.