NEW YORK, Dec 27 (Reuters) - The U.S. dollar fell against the Japanese yen on Wednesday, giving up most of the gains logged in the previous session, as worries about widening cracks in global stock markets prompted investors to load up on perceived safe-haven assets.

More broadly, the dollar Index, which tracks the greenback versus the euro, yen, sterling and three other currencies, was down 0.39 percent

“The dollar has had a great rally this year but it doesn’t have much more in it to go further, especially if you are seeing the Fed slow down in rates,” said Trang.

Last week, the Federal Reserve raised rates for the fourth time this year but interest rate futures show traders are skeptical the central bank will raise rates at all next year.

Data on Thursday showed earnings at China’s industrial firms in November dropped for the first time in nearly three years, as slackening external and domestic demand left businesses facing more strain in 2019 in a sign of rising risks to the world’s second-largest economy.

The gloomy data points to a further loss of economic momentum as a trade dispute with the United States puts pressure on China.

Reuters reported on Thursday that the Trump administration was considering an executive order in the new year to declare a national emergency that would bar U.S. companies from using Huawei and ZTE products.

The Australian dollar, seen as a proxy for Chinese growth because of Australia’s export-reliant economy, fell 0.54 percent.

With oil prices falling on Wednesday, the greenback rose against commodity-linked currencies. The dollar was up 0.49 percent against its Canadian counterpart, while the New Zealand dollar fell 0.34 percent.

The dollar found little support from data showing the number of Americans filing applications for jobless benefits fell marginally last week in a sign of labor market strength, with claims appearing to stabilize after drifting higher in recent months.

Sterling held above a three-day low as investors remained sidelined awaiting another round of Brexit developments, as a broadly weaker dollar offered some support to the struggling British currency. (Reportingby Saqib Iqbal Ahmed Editing by Bill Trott)