Canada posted a near-record trade deficit in May, as volumes of both exports and imports slumped.

Statistics Canada reported Wednesday that the merchandise trade deficit totalled $3.28-billion on a seasonally adjusted basis in the month, slightly smaller than April's $3.32-billion. The April figure, which was revised from an originally reported $2.94-billion, represents a new record.

Exports, by value, fell 0.7 per cent month over month, despite higher prices, as volumes dropped 2.3 per cent. Imports declined 0.8 per cent in value, as volumes fell 0.9 per cent while prices edged up.

Story continues below advertisement

The May deficit was wider than the $2.7-billion that economists had expected. It marked the fourth straight month in which the shortfall topped $2.5-billion. For the first five months of the year, Canada's cumulative deficit was $12.3-billion.

May's export decline came despite a 7.1-per-cent increase in the value of energy exports. Economists had expected the sector to have struggled in the month, as the Alberta wildfires cut deeply into oil production, but exports benefited from a 9.7-per-cent price surge. Volumes, however, dipped 2.3 per cent.

"Preliminary evidence indicates that Canadian refinery activity declined in May, freeing up crude oil supply for export, while the remaining shortfall was largely met by a drawdown of Alberta inventories of crude oil," Statscan said.

It also came in a month when the Canadian dollar fell more than 2 cents (U.S.), a direction that would typically make Canadian exports more price-competitive. However, that decline came after the currency had reached nearly 80 cents (U.S.) at the start of the month, its highest in nearly a year.

Non-energy exports, which many experts have been expecting to continue to benefit from last year's sharp drop in the Canadian currency, fell 1.8 per cent in the month. Non-energy volumes slumped 3.2 per cent.

"In real terms, exports of non-energy products fell in a month when our main customer, the U.S., saw an increase in imports volumes of non-petroleum products. So, the benefits of the cheap Canadian dollar seem to be blunted by lost market share," said National Bank of Canada senior economist Krishen Rangasamy in a research note.

The U.S. trade data for May, released at the same time as Canada's numbers, showed that U.S. goods import volumes rose 1 per cent in the month. The U.S. market accounts for more than three-quarters of Canadian exports. Statscan said exports to the U.S. rose 3.6 per cent, and Canada's trade surplus with the U.S. more than doubled, to $2.8-billion from $1.3-billion in April.

Story continues below advertisement

The value of Canada's exports of industrial machinery and equipment fell 4.9 per cent month over month, further evidence of continued muted U.S. business investment. Metal and mineral products were down 5.4 per cent. Motor vehicle and parts exports slipped 1 per cent, and consumer goods fell 1.2 per cent.

On the import side, the volatile aircraft and transportation equipment sector slumped 23.5 per cent by value, while energy imports rebounded 18.2 per cent from a weak April. Metal and mineral products fell 3.9 per cent, while industrial machinery and equipment declined 3 per cent – suggesting that Canada's deep slump in business investment has yet to turn the corner.

"On the year, imports are down by roughly 2 per cent, highlighting in part the difficulties the Canadian economy has faced in generating firmer internal demand," said economist Nick Exarhos of Canadian Imperial Bank of Commerce in a research report.