Canada's main stock index edged slightly higher on Tuesday as bank and fertilizer stocks rallied, but gains for the index were mostly pared as lower gold prices weighed on mining stocks.

The Toronto Stock Exchange's S&P/TSX composite index has rebounded 27 per cent after hitting a three-year low in January. But the rally has stalled since earlier this month, when the index touched its highest in more than a year.

In the absence of a fresh catalyst, stock markets, including the TSX, are going to "trend sideways," said Jay Bala, senior portfolio manager at AIP Asset Management Inc., who favors investment strategies whose returns are not dependent on the direction of the overall market.

Catalysts could include a U.S. interest rate hike which would add to market volatility in the short-term, but be better for stocks over the long-term, Bala added.

The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE closed up 2.88 points, or 0.02 per cent, at 14,684.85.

Five of the index's 10 main groups ended higher.

Bank of Nova Scotia BNS.TO was among the biggest gainers, with the country's third-biggest lender up 1.6 per cent at $69.93 after reporting earnings above expectations even as it reins in domestic mortgage lending.

The financials group was up 0.7 per cent overall, as Scotia's earnings rounded out a robust earnings season for banks.

The energy group firmed 0.2 per cent, but some gains were pared as oil turned lower. U.S. crude oil futures settled 63 cents lower at US$46.35 a barrel. 

Ritchie Bros. Auctioneers Inc RBA.TO soared more than 24 per cent to $46.74. The industrial auctioneer said on Monday it will buy IronPlanet, a privately held U.S. e-commerce site for used equipment, for about $758.5 million.

Agrium Inc AGU.TO and Potash Corp of Saskatchewan Inc POT.TO said they were in talks to merge, a deal to create a fertilizer and farm retailing giant worth more than $25 billion but which could also trigger U.S. regulatory scrutiny.

Potash Corp surged 11.5 per cent to $23.30 and Agrium advanced 7.4 per cent to $125.09.

Still, the materials group, which includes precious and base metals miners as well as fertilizer companies, fell nearly 2 per cent.

Gold fell XAU= to a six-week low after Federal Reserve officials sounded a hawkish note on interest rates, while attention turned to U.S. payrolls data this week for further clues on the pace of rate hikes. 

Barrick Gold Corp ABX.TO declined 4.8 per cent to $22.81, while Goldcorp Inc G.TO lost 4.7 per cent to $20.25.