* TSX up 22.81 points, or 0.14 percent, to 16,025.59
* Half of the TSX's 10 main groups were up
* TSX touches intraday high of 16,064.68
By Solarina Ho
TORONTO, Oct 31 (Reuters) - Canada's main stock index notched a third-straight record close on Tuesday, fueled by a rally in energy shares that offset Shopify Inc's steep decline and broad losses among mining firms.
Oil and gas companies, which account for about 20 percent of the index's weight, rallied 1.7 percent as crude prices closed at the highest level in more than two years. Corp ECA.TO rose 4.4 percent to finish at C$15.09, while Crescent Point Energy Corp CPG.TO rallied 4.5 percent to C$10.61.
"Year-to-date, energy is the worst-performing sector by a long shot," said Manash Goswami, a portfolio manager at First Asset Investment Management Inc. The group has fallen about 12 percent this year. "People are a little bit more confident with crude prices ... It seems the fundamental background for oil is more constructive now."
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE rose 22.81 points, or 0.14 percent, to a record close of 16,025.59. It touched a fresh intraday high of 16,064.68.
Half of the index's 10 primary sectors rose.
"If energy reverses their first-half of the year performance or claws some of it back ... you can see this rally continuing," said Goswami, adding that investors are also seeing a positive growth trend based on quarterly results so far.
The heavily weighted financials group added 0.2 percent.
Canadian Western Bank CWB.TO gained 4.8 percent to C$36.34 following news it is acquiring ECN Capital Corp ECN.TO assets. ECN Capital Corp ECN.TO was up 4.8 percent at C$36.34.
Colliers International Group CIGI.TO jumped 7.8 percent to C$75.61 after posting strong quarterly growth.
Healthcare stocks also rallied, climbing 1.7 percent, with cannabis producer Canopy Growth WEED.TO up 6.3 percent to
C$16.18, extending the previous session's gains.
Valeant Pharmaceuticals (NYSE:VRX) Inc VRX.TO was up 3 percent to
C$15.07 after it said it will cut its debt by an additional $125 million, exceeding its previously stated goal of $5 billion, and months ahead of schedule.
Consumer discretionaries added 0.5 percent, with Shaw Communications Inc SJRb.TO up 1.7 percent at C$29.46.
On the downside, Shopify Inc SHOP.TO slumped 8.5 percent to C$128.26 despite posting strong quarterly results. Investors expressed disappointment it did not do more to address short-seller Citron Research's concerns. L2N1N60KI
The technology sector lost 1.7 percent.
The materials group, home to mining companies, lost 0.4 percent, in tandem with weaker bullion prices. GOL/
Eldorado Gold ELD.TO fell 6.9 percent to C$1.62, while a number of other miners, including Goldcorp Inc G.TO and Barrick Gold ABX.TO , fell more than 1 percent.