Canada's main stock index gained on Monday, boosted by a bounce-back in shares of cannabis producers and sharp gains for gold miners as bullion prices hit a four-month high.

The Toronto Stock Exchange's S&P/TSX composite index closed up 63.63 points, or 0.39 per cent, at 16,371.81. Seven of its 10 main sectors were higher, while consumer staples and discretionary groups weighed.

The Canadian dollar advanced against its broadly weaker U.S. counterpart on Friday as oil prices climbed and chances rose that the Bank of Canada will raise interest rates next week.

At 4 p.m. ET, the Canadian dollar was up 0.4 at $1.2472 to the greenback, or 80.18 cents US. The currency traded in a range of $1.2466 to $1.2556.

The materials group, which includes precious and base metals miners and fertilizer companies, added 1.6 per cent as a weaker U.S. currency boosted the price of gold to its highest since September.

Some of the world's biggest gold miners were among the index's most influential gainers, with Goldcorp Inc (G.TO) jumping 6.8 per cent to $19.10 and Barrick Gold Corp (ABX.TO) up 3.2 per cent at $19.49.

Cannabis companies bounced back after heavy losses late last week, with Canopy Growth Corp (WEED.TO) jumping 12.8 per cent to $36.50 and Aphria Inc (APH.TO) surging 20.4 per cent to $21.70.

Cannabis companies have broadly jumped in recent months as Canada moves towards legalizing recreational use, but investors booked some profits last week after the U.S. federal government rescinded an order that had eased enforcement of federal law in states where the drug has been made legal.

BlackBerry Ltd (BB.TO), which launched new cybersecurity software which identifies vulnerabilities in programs used in self-driving cars, ended 2.8 per cent higher at $17.48.

The energy group climbed 0.4 per cent as oil prices hovered near a three-year high, while financials gained 0.2 per cent, with Sun Life Financial Inc (SLF.TO) up 2.8 per cent at $53.78 after two brokerages raised their price targets on the stock.