Shipping containers sit stacked at Qingdao Port after snow on February 14, 2019 in Qingdao, Shandong Province of China.

China's exports and imports declined in October, Reuters reported citing data from the country's customs released on Friday.

In dollar terms, exports fell 0.9% while imports fell 6.4% from a year ago in October, but beat analysts' forecasts.

Trade balance for October was $42.81 billion, compared to analyst forecasts of $40.83 billion.

Economists polled by Reuters had expected October exports to fall 3.9% and imports to fall 8.9% from a year earlier.

In September, China's exports fell 3.2% from a year ago, while imports dropped 8.5% during the same period.

The Chinese economy — the second largest in the world — is growing at a slower pace amid the protracted trade battle between Beijing and Washington.

Despite the better-than-expected trade data for October, the outlook in the coming months is not positive, said Martin Rasmussen, China economist at Capital Economics.

"Looking ahead, we think that subdued global growth will continue to weigh on exports," wrote Rasmussen in a note on Friday.

"This headwind is unlikely to be fully offset by the partial tariff rollbacks that are being proposed as part of the 'Phase One' trade deal, especially given that the recent appreciation of the renminbi in anticipation of a deal means that the exchange rate will act as less of a prop to outbound shipments," he added.

On Thursday, China's Commerce Ministry said that Beijing had agreed with Washington to lift existing trade tariffs between the two nations in phases.

Market participants had expected the two economic giants to sign a deal later this month, after both Washington and Beijing spoke of progress in talks late last week.

However, Reuters reported on Wednesday that a meeting between President Donald Trump and Chinese President Xi Jinping could be postponed until December — delaying a chance for the two leaders to sign an interim trade deal.

The world's two largest economies have imposed tariffs on billions of dollars' worth of one another's goods since the start of 2018, battering financial markets and souring business and consumer sentiment.

— CNBC's Yen Nee Lee and Sam Meredith contributed to this report.