That left the country with a trade surplus of $38.17 billion for the month, according to a Reuters calculation based on official data.

Analysts polled by Reuters had expected October shipments from the world’s largest exporter to have risen 7.2 percent, slower than 8.1 percent in the previous month.

Imports had been expected to rise 16.0 percent, softening from an 18.7 percent gain seen in September.

Analysts had forecast China’s trade surplus to have widened to $39.5 billion in October from September’s $28.61 billion.

After several lean years, China’s trade performance has rebounded this year thanks to strong demand at home and abroad.

While exports are contributing to China’s economic growth once again, global investors have been more focused on its strong appetite for industrial commodities such as iron ore and coal, which is boosting resources prices worldwide. (Reporting by Beijing Monitoring Desk; Editing by Shri Navaratnam)