(Adds portfolio manager comments, details on BlackBerry, Valeant and railroad stocks and updates prices)
* TSX closes up 23.12 points, or 0.16 percent, at 14,754.55
* Index touches its highest in one week at 14,815.81
* Energy climbs 7.7 percent over past two days
* Just three of the TSX's 10 main groups end higher
By Fergal Smith
TORONTO, Sept 29 (Reuters) - Canada's main stock index rose on Thursday to a one-week high as energy stocks added to sharp gains from one day before on a surprise output cut agreement by OPEC.
The most influential movers on the index were some of the country's largest energy companies. Suncor Energy Inc rose 2.3 percent to C$36.41 and Canadian Natural Resources Ltd advanced 2.4 percent to C$42.14.
The index's energy group climbed 2.2 percent, which takes its rally over the past two days to 7.7 percent.
The oil patch has been "thrown a bone" by the output cut, said Rick Hutcheon, president and chief operating officer at RKH Investments.
With a low for oil prices probably in place it gives energy companies an opportunity to look to the future and make capital spending plans, Hutcheon added.
Oil marched higher on optimism over the Organization of the Petroleum Exporting Countries' first output cut plan in eight years, despite some analysts' doubts that the reduction would be enough to rebalance a heavily over-supplied market. U.S. crude oil futures settled $1 higher at $48.07 a barrel.
Gains for the energy sector offset broader losses for the index, including a 0.2 percent dip in shares of financial sector companies as investors worried about the stability of Germany's biggest bank.
The Toronto Stock Exchange's S&P/TSX composite index closed up 23.12 points, or 0.16 percent, at 14,754.55.
It touched its highest since Sept. 22 at 14,815.81.
Just three of the index's 10 main groups ended higher, including a 0.2 percent gain for telecom stocks which are considered defensive by investors.
Railroad stocks also gained ground, with Canadian National Railway Co rising 0.6 percent to C$84.85.
BlackBerry Ltd fell 4.1 percent to C$10.44 as most of the gains made on Wednesday after announcing a strategic shift away from hardware were given up.
SNC-Lavalin Group Inc cut its full-year adjusted profit forecast for its engineering and construction business due to commercial issues in two oil & gas projects in the Middle East. Its shares tumbled nearly 7 percent to C$51.10.
Valeant Pharmaceuticals International Inc fell 4.7 percent to C$32.95, while the overall healthcare group lost nearly 1 percent. (Reporting by Fergal Smith; Editing by Alistair Bell and Diane Craft)