By Fergal Smith

The Canadian dollar edged higher against its U.S. counterpart on Thursday as domestic data showing a narrower-than-expected trade deficit supported hopes of economic recovery, with the loonie adding to this week's rally.

Canada posted a trade deficit of C$677 million in May as exports jumped 6.7%, data from Statistics Canada showed. Analysts had forecast a deficit of C$3 billion.

"This report is consistent with the V-shaped recovery story, as activity picked up in May after the economy bottomed in April," said Ryan Brecht, a senior economist at Action Economics.

In a V-shaped recovery, activity rebounds quickly after a sharp decline.

Separate data showed that Canadian manufacturing activity contracted at a slower pace in June, hinting at a turnaround.

"Yet uncertainty remains elevated, with the resurgence in virus cases and pause in reopenings prompting worries that the recovery stalled in late June," Brecht said.

Several U.S. states, along with some other parts of the world, are reversing or pausing reopenings to tackle a recent surge in infections.

The loonie was trading 0.1% higher at 1.3571 to the greenback, or 73.69 U.S. cents, having traded in a range of 1.3560 to 1.3623. Since the start of the week it was up 0.9%.

The Canadian dollar is likely to gain over the coming year if a potential economic recovery from the coronavirus crisis boosts stocks and the price of oil, assets closely tracked by the currency, toward pre-pandemic levels, a Reuters poll showed.

Wall Street closed higher after data showing a record surge in U.S. payrolls, while U.S. crude prices settled 2.1% higher at $40.65 a barrel.

Canadian government bond yields rose across a steeper curve as the market reopened following the Canada Day holiday on Wednesday. The 10-year yield was up 3.3 basis points at 0.560%.

(Reporting by Fergal Smith; editing by Jonathan Oatis and Alistair Bell)