The Canadian dollar weakened against its U.S. counterpart on Friday as oil fell and investors braced for a speech next week by Bank of Canada Governor Stephen Poloz, while the greenback extended its recovery against a basket of major currencies.    

The U.S. dollar rose for a second straight day on the view that it would gain from a rise in border tariffs, tax reform and future stimulus spending.             

"I still think the market is looking for [the Canadian dollar] to try and resume its upside and maybe there is a little bit of position squaring going on looking forward to next Tuesday's Canadian GDP data and the Bank of Canada Governor Poloz speaking as well," said Amo Sahota, director at Klarity FX.

"Poloz is the wildcard out here and the market expects him to retain his dovish commentary and maybe get a bit more bang for his buck on trying to talk the currency down."

U.S. crude oil futures settled 61 cents US lower at US$53.17 a barrel after data suggested drilling is ramping up in the United States.

Oil is one of Canada's major exports.       

Speculators turned bullish on the Canadian dollar for the first time since September, data from the Commodity Futures Trading Commission and Reuters calculations showed. Canadian dollar positions swung to net long 2,519 contracts as of Jan. 24 from net short 5,456 contracts a week earlier.

The Canadian dollar ended at $1.3138 to the greenback, or 76.12 cents US, weaker than Thursday's close of $1.3098, or 76.35 cents US.

The currency's strongest level of the session was $1.3085, while its weakest was $1.3155.

For the week, the loonie rose 1.3 per cent as investor fears of a more unfavourable trade outlook for Canada abated and after U.S. President Donald Trump signed orders on Tuesday smoothing the path for the Keystone XL oil pipeline.

If built, the pipeline from Alberta to Nebraska would yield about US$2.4 billion a year for Canada, split between government revenues, shareholder profits and re-investment into the still-recovering Canadian oil patch, according to a Conference Board of Canada research note prepared for Reuters on Thursday. 

Canadian government bond prices were higher across a steeper yield curve, with the two-year up two cents to yield 0.805 per cent and the 10-year rising 36 cents to yield 1.777 per cent. On Thursday, the 10-year yield had touched a nearly six-week high at 1.851 per cent.