The Canadian dollar strengthened on Thursday against its U.S. counterpart as solid domestic retail sales boosted expectations for an interest rate hike in July from the Bank of Canada.

Canadian retail sales rose 0.8 per cent in April on higher gasoline prices and increased demand for home appliances and garden supplies, exceeding forecasts for a 0.2 per cent gain.

The data shows a "stronger starting off point than people had assumed for Q2 consumption," said Mark Chandler, head of Canadian fixed-income and currency strategy at RBC Capital Markets.

Chances of a BoC rate hike as early as next month rose to 34 per cent from less than one in four before the retail sales report, data from the overnight index swaps market showed. Traders have already priced in a rate hike for 2017.

The Bank of Canada's top two officials last week said that looser monetary policies put in place in 2015 had largely done their work, and the bank would assess whether rates must remain at near-record lows.

Interest rate expectations have become a more important driver for the currency than the direction of oil prices, Chandler said.

Oil, one of Canada's major exports, edged up from multimonth lows, but prices remained under pressure from a supply glut. U.S. crude oil futures settled 21 cents higher at US$42.74 a barrel.

At 4 p.m. ET, the Canadian dollar was trading at $1.3235 to the greenback, or 75.56 U.S. cents, up 0.8 per cent.

The currency traded in a range between $1.3208 and $1.3338. In the previous session, the loonie touched its weakest in nine days at $1.3348.

Gains for the Canadian dollar came as Home Capital Group Inc (HCG.TO), which nearly collapsed in April, said Warren Buffett's Berkshire Hathaway Inc (BRKa.N) would provide a new $2 billion line of credit to its Home Trust Co unit.

Bearish bets on the Canadian dollar had set a fresh record high in May as investors worried that the alternative lender's troubles could hurt the country's red-hot housing market.

Canadian government bond prices were lower across much of a flatter yield curve, with the two-year down 4 cents to yield 0.933 per cent and the 10-year falling 9 cents to yield 1.5 per cent.

The gap between Canada's 2-year yield and its U.S. equivalent narrowed by 3 basis points to a spread of -41.1 basis points, its smallest since Feb. 24.

Canadian inflation data for May is due on Friday