Finally, some good news for Japan: the country’s trade deficit was considerably slimmer than anticipated as exports rose at their fastest pace in eight months.

The trade deficit came in at Y710bn in October, the smallest shortfall since June 2013 and down 26 per cent from Y961bn a month before. Analysts had expected the trade shortfall to rise to Y1.027tn.

Solid exports played a key role: they rose 9.6 per cent from a year ago, more than doubling forecasts for a 4.5 per cent gain. That’s their best annual pace since February.

The import bill was also smaller than anticipated. Imports were up 2.7 per cent from a year ago, versus forecasts for a 3.4 per cent gain.

The data provides some hope that exports were picking up in the first month of the fourth quarter, following two quarters of contraction for the broader economy.

Still, October was the 28th monthly trade deficit in a row.

Investors have become used to Japan recording monthly trade shortfalls. But it’s worth remembering just how rare this is. Between 1980 and 2010 Japan recorded a trade surplus every year. But since the Fukushima nuclear disaster of March 2011, the energy-poor nation has been forced to increase imports of fossil fuels as a substitute, and with the yen getting battered those imports cost more than usual. As a result last year’s trade deficit was the worst on record.

Update: Analysts at Capital Economics say the deficit is likely to continue shrinking thanks to falling energy prices and a weaker yen.

The recent plunge in the price of crude oil has yet to be fully reflected in the cost of imports. We estimate that a lower import bill for petroleum could lower the monthly trade deficit by almost ¥300 billion in coming months.

Below, a chart of the trade deficit (a) going back to 2013 and (b) going back to 2004.