The Canadian currency was trading 0.2% higher at 1.2723 to the greenback, or 78.60 U.S. cents, after earlier hitting its weakest level since Dec. 29 at 1.2813.

"The loonie has largely tracked the progress of the recovery in the S&P 500 index in today's trading session," said Simon Harvey, Head of FX analysis for Monex Europe and Monex Canada.

U.S. stock markets, including the benchmark S&P 500, edged higher after they were slammed on Wednesday by Federal Reserve minutes that struck a hawkish note.

Canada posted a trade surplus of C$3.1 billion in November, the largest since September 2008, helped by a 3.8% increase in exports.

"Continued strength in manufacturing sentiment south of the border, alongside robust commodity prices and demand, bode well for exports," Omar Abdelrahman, an economist at TD Economics, said in a note.

The price of oil, one of Canada's major exports, was supported by escalating unrest in OPEC+ oil producer Kazakhstan and supply outages in Libya. U.S. crude settled 2.1% higher at $79.46 a barrel.

Canada's employment report for December, due on Friday, could offer further clues about the strength of its economy.

Since December, some Canadian provinces have announced restrictions to help contain the spread of the Omicron coronavirus variant.

Canadian government bond yields were higher across the curve, tracking the move in U.S. Treasuries. The 10-year touched its highest level since Nov. 26 at 1.718% before dipping to 1.706%, up 6.1 basis points on the day.

(Reporting by Fergal Smith; Editing by Jonathan Oatis and Alexander Smith)

By Fergal Smith