Oil prices climbed Monday while U.S. stocks gave back a portion of their record-breaking rally, as fresh tensions between Washington and Tehran overshadowed optimism about corporate earnings. The United States had just seized an Iranian-flagged cargo vessel it said had tried to evade a blockade of Iranian ports. The S&P 500 slipped 0.2% from its record high for just its second decline in 14 trading days, while the Dow Jones Industrial Average dipped less than 0.1% and the Nasdaq composite fell 0.3% to 24404.39. Brent crude oil climbed 5.6% to $95.48 as investors worried Iran could continue restricting petroleum exports from the Persian Gulf.

The muted moves suggest investors still believe the United States and Iran can reach a ceasefire agreement, due to expire Tuesday evening, that could resume Middle East oil shipments. Crude prices remain well below their $119-per-barrel peak reached earlier in the conflict.

Market reversal on Iranian tensions

The market’s declines followed a volatile three-day pattern. On Friday, Iran announced it was reopening the Strait of Hormuz to commercial traffic, triggering a stock rally and an oil-price decline. But Iran reversed course Saturday after the U.S. pressed ahead with its blockade of Iranian ports, closing the strait again.

Investors’ measured response Monday suggests they still believe both countries have economic incentives to reach a fresh ceasefire agreement. The S&P 500 remains above its pre-war level despite the recent retreat.

Sector-specific impacts

Companies with steep fuel costs bore the heaviest losses. Norwegian Cruise Line Holdings dropped 3.5%, while Royal Caribbean Group fell 1.1%. United Airlines sank 2.8%, and American Airlines fell 4.2% after announcing it is not interested in a merger with United.

TopBuild bucked the trend, jumping 19.4% following an announcement that QXO is acquiring the building-products distributor in a deal valued at roughly $17 billion. QXO said the transaction would make it the continent’s second-largest publicly traded building products distributor, though QXO’s stock fell 3.1%.

Earnings momentum sustains investor confidence

The market’s relatively muted response to the latest Iran tensions reflects investor confidence in the trajectory of corporate earnings. About 10% of S&P 500 companies have already reported first-quarter results, and nearly nine out of 10 have exceeded analyst expectations.

Morgan Stanley strategists led by Michael Wilson said in a market note that “despite geopolitical risks, the earnings recovery remains intact.” If the remaining companies match analyst expectations, overall earnings per share for S&P 500 companies will be 13% higher than a year earlier.

Companies scheduled to report earnings this week include UnitedHealth Group on Tuesday, Tesla on Wednesday, and Procter & Gamble on Friday. Foreign markets showed mixed performance Monday: Germany’s DAX fell 1.2%, while Hong Kong’s Hang Seng added 0.8%.

Critical deadline looms

The next major test arrives Tuesday at 8 p.m. Eastern time—early Wednesday in Tehran—when the ceasefire agreement between the United States and Iran is scheduled to expire. Market moves Monday suggest investors believe a new agreement is still possible.