NEW YORK (Reuters) - Equity markets rallied globally on Tuesday as Chinese trade data defied expectations of a deep downturn as a result of the coronavirus pandemic, igniting hopes that world economies can soon recover and removing the safe-haven allure of the greenback.

Oil prices fell more than 6% as investors doubted that record supply cuts by the Organization of the Petroleum Exporting Countries and other producers would soon balance markets pummeled by the pandemic’s blow to demand.

Gold soared nearly 2% and hit its highest since late 2012 as investors piled in to hedge against potential inflation and currency debasement resulting from massive central bank and government stimulus measures around the globe.

Data showed that China’s exports fell only 6.6% in March from a year ago, far less than the expected 14% plunge. Imports fell 0.9% compared with expectations for a 9.5% drop.

Stocks rallied around the globe on the Chinese data and signs that sweeping lockdowns to contain the spread of the coronavirus were working. Still, the World Health Organization warned the epidemic has not yet peaked.

Spanish shares .IBEX gained as much as 1.5% as some businesses reopened, but pulled back to close up 0.5% as European stocks also pared similar gains.

The rally on Wall Street shows investors are not concerned about current results as the corporate earnings season gets underway but are focused on the long-term value of each company’s franchise, said Tim Ghriskey, chief investment strategist at Inverness Counsel in New York.

FILE PHOTO: The New York Stock Exchange (NYSE) is seen in the financial district of lower Manhattan during the outbreak of the coronavirus disease (COVID-19) in New York City, New York, U.S., April 13, 2020. REUTERS/Andrew Kelly

“Is it an all-clear signal?” said Ghriskey. “No, because I have difficulty in believing the market fully recovers until the timing of the economic recovery is visible, and we just don’t know that timing.”

Profits at JPMorgan Chase & Co JPM.N and Wells Fargo & Co WFC.N plunged in the first quarter, as the banks on Tuesday offered the first glimpse of the pandemic's impact on corporate America. Their shares fell -2.7% and -4.0%.

MSCI's All-Country World Index .MIWD00000PUS, which tracks shares across 49 countries, gained 2.43% and its emerging market stock index rose 1.49%.

On Wall Street, the Dow Jones Industrial Average .DJI rose 558.99 points, or 2.39%, to 23,949.76. The S&P 500 .SPX gained 84.43 points, or 3.06%, to 2,846.06 and the Nasdaq Composite .IXIC added 323.32 points, or 3.95%, to 8,515.74, lifted by Amazon hitting a new record high.

Chinese shares gained, with the blue-chip index .CSI300 closing up 1.9%. Australian shares .AXJO also rose 1.9%, Japan's Nikkei .N225 gained 3.1% and Hong Kong's Hang Seng .HSI 0.6%.

Oil prices remain more than 50% lower this year.

Commitments to cut global output by about 19.5 million barrels a day, including voluntary cuts that will happen gradually in places like the United States, will not be enough to reduce the growing worldwide supply glut, analysts said.

Brent futures LCOc1 fell $2.14 to settle at $29.60 a barrel while U.S. crude CLc1 slid $2.30 to settle at $20.11.

The dollar index =USD fell 0.527%, with the euro EUR= up 0.63% to $1.0982. The Japanese yen YPY= strengthened 0.53% versus the greenback at 107.23 per dollar.

Benchmark 10-year notes US10YT=RR last fell 1/32 in price to yield 0.752%.

U.S. gold futures GCcv1 settled up 0.4% at $1,768.90 an ounce after earlier hitting their highest since February 2013 at $1,788.80. Spot gold XAU= jumped as much as 1.9% to $1,746.50.