The gain for the loonie on Friday follows a decline in recent days. As the end of the month approaches, some market players tend to rebalance their currency hedges.

"As the month-end passed in London for the big global investors ... then I think the market said upward pressure in USD-CAD is off, back to where we were, which is down below 1.34," said Greg Anderson, global head of foreign exchange strategy at BMO Capital Markets. "I think we'll see more of that next week."

The loonie has benefited in July from a weakening of the U.S. dollar, as coronavirus cases climbed in the United States, and from higher prices for oil, one of Canada's major exports.

On Friday, the loonie was trading 0.3% higher at 1.3377 to the greenback, or 74.76 U.S. cents, taking its gain for the month to 1.5%. The monthly winning streak, which followed a sharp decline in March when financial markets were pummeled by the coronavirus crisis, was the currency's longest since 2014.

Canadian gross domestic product rose by 4.5% in May, and a preliminary flash estimate sees a further 5% increase in June as the economy reopens following COVID-19 lockdowns, Statistics Canada said. Economists had expected a 3.5% gain for May GDP.

U.S. crude oil futures settled 0.9% higher at $40.27 a barrel, benefiting from news that U.S. oil output cuts in May were the largest on record.

Canadian government bond yields were higher across the curve, with the 10-year yield up 2.1 basis points at 0.468%.

Canadian financial markets will be closed on Monday for a civic holiday.

By Fergal Smith