The dollar's rally stalled on Tuesday as investors wavered between hopes for a de-escalation in the war between the United States and Israel on one side and Iran on the other, and fears that such optimism might be premature.

US President Donald Trump said the war could end much sooner than the timeline he initially set, but threatened to escalate attacks if Tehran disrupted oil shipments through the Strait of Hormuz.

In response, Iran's Revolutionary Guard dismissed Trump's statements as nonsense, asserting that the embargo would continue until US and Israeli attacks ceased. Despite this, stock markets rose while oil prices retreated from their highest levels in over three years, indicating investors' readiness to seize upon any positive signals.

Nick Kennedy, currency strategist at Lloyds Bank, said: I don't think the market is overly optimistic. What happened last week was simply an overreaction.

He added: Trump isn't always the most consistent messenger of his intentions, but investors are assessing expectations in a more pragmatic way. Kennedy noted that governments might intervene by releasing oil reserves, and that the approaching midterm elections could push Trump to adopt a more moderate approach. Officials said that energy ministers from the G7 nations are scheduled to discuss rising energy prices during a phone call on Tuesday, while EU leaders are expected to hold a meeting later that day to discuss the issue.

The dollar, considered a safe haven, fell 0.1% to $1.1645 against the euro, while it rose 0.1% to 157.49 Japanese yen. The dollar index, which measures the greenback against a basket of six major currencies, also declined 0.2%, but recovered from an earlier low of 98.49.

The dollar remains the preferred safe haven for traders, given that the United States is a major oil producer, which puts it in a better position to withstand energy price shocks compared to other import-dependent economies.

Thomas Simons, chief US economist at Jefferies, said: Higher prices mean higher income for US oil producers and exporters, and this increase may halt the decline of the dollar that has continued since Liberation Day.

Analysis released by Deutsche Bank on Monday showed that larger market moves away from risky assets will only occur if oil prices remain at high levels for an extended period, coinciding with a shift in central bank policies and the emergence of tangible signs of a broad economic slowdown.

Strategist Henry Allen said: “How close are we to those thresholds? We are much closer than we were a week ago.” He added: “But according to several indicators, we are not there yet, which explains why stocks have not yet experienced the kind of market downturn seen in 2022,” referring to the fallout from the energy shock that followed Russia’s invasion of Ukraine. In currency markets, the pound recovered from Monday’s losses to trade 0.1% higher at $1.3455.

However, investors remain concerned that prolonged high fuel prices could curb global economic growth, as their effect is similar to imposing a tax on businesses and consumption, while at the same time potentially pushing central banks away from interest rate-cutting policies.