US stock markets traded higher on Wednesday, tracking a global rally as easing oil prices and hopes of a potential end to the Iran war lifted investor sentiment, according to AP.The S&P 500 rose 0.6%, adding to its sharp gains from the previous session, while the Dow Jones Industrial Average was up 292 points, or 0.6%, as of 10 a.m. Eastern time. The Nasdaq Composite advanced 1%, led by gains in technology stocks.The rally followed strong gains across global markets, with South Koreaโs Kospi surging 8.4% and Japanโs Nikkei 225 jumping 5.2%, while key European indices in France, Germany and the United Kingdom rose more than 1%.Investor optimism was driven by comments from US President Donald Trump, who said Iran had โjust asked the United States of America for a CEASEFIRE!โ shortly before markets opened. โWe will consider when Hormuz Strait is open, free, and clear. Until then, we are blasting Iran into oblivion or, as they say, back to the Stone Ages!!!โTrump had also said earlier that the US military campaign could end within two to three weeks, adding to hopes of de-escalation. These remarks followed earlier signals, including a report quoting Iranโs president as saying the country has โthe necessary will to end the warโ under certain conditions, including guarantees against future aggression.Oil prices eased on these developments, with Brent crude trading at around $101.16 per barrel, down from recent highs but still significantly above pre-war levels of about $70.Despite the gains, markets remain volatile as the conflict continues to disrupt energy supplies. Iran maintains control over the Strait of Hormuz, a critical route through which about one-fifth of global oil flows during peacetime.US gasoline prices also rose further, with the national average reaching $4.06 per gallon, according to AAA.โThe worry on Wall Street has been that the war may last a long time and keep oil and natural gas from the Persian Gulf out of global markets, which could create a brutal blast of inflation,โ the report said.Analysts cautioned that the impact of the conflict may persist even if hostilities ease.โDe-escalation hopes have given markets a lift, but we think the effects of the war would, in many cases, persist even if the war did end soon,โ said Thomas Mathews, head of markets, Asia Pacific at Capital Economics, AP quoted.โItโs worth thinking through how markets might fare if the war were to end โvery soonโโฆ Do markets have further to recover if sentiment continues to improve? The answer is almost certainly yes,โ he added.On Wall Street, most stocks traded higher, with Big Tech leading gains. Alphabet rose 2.8% and Nvidia gained 0.8%, providing strong support to the S&P 500.Among other stocks, Nike dropped 13.1% despite reporting better-than-expected quarterly profit, as weak financial forecasts weighed on investor sentiment. Hasbro declined 3.6% after reporting unauthorised access to its computer network.In the bond market, US Treasury yields were largely stable. The 10-year yield edged up to 4.32% from 4.30% late Tuesday, supported by stronger-than-expected data on retail sales and manufacturing activity.The White House said President Trump is expected to address the public later in the day on the Iran war, a key event that markets will closely monitor for further direction.While equities have responded positively to ceasefire hopes, continued geopolitical tensions and elevated oil prices remain key risks for global markets and inflation outlook.