By Alastair Sharp
TORONTO (Reuters) - Canada's main stock index ended higher on Wednesday as a political deal to avert a U.S. default neared completion, but gains were capped by weak materials stocks and a sharply lower earnings revision by SNC-Lavalin Group Inc
The TSX tracked larger gains in U.S. equity markets , which rose on optimism that a fiscal deal that would prevent Canada's biggest trade partner defaulting on its debt could be wrangled between Washington lawmakers at the eleventh-hour.
North American equities are likely to keep fluctuating on each twist and turn of the debt saga, and then resume their focus on the data that will inform the Federal Reserve's decision on when to pull back its monetary stimulus, said Michael Sprung, president at Sprung Investment Management Inc.
"Until we see something towards a more sustainable course for the U.S. fiscal situation I don't think we're going to be out of the woods for a while," he said.
"Today it's the fiscal concerns and tomorrow it'll be the next economic release, whether it be employment or manufacturing or house prices or whatever."
The Toronto Stock Exchange's S&P/TSX composite index closed the session up 25.75 points, or 0.2 percent, at 12,957.21. Nine of the index's 10 main groups ended in positive territory. Wall Street stocks jumped more than 1 percent.
"The U.S. market is popping up on the upside, so I guess they're optimistic, and it'll eventually drag us up," said Paul Hand, managing director at RBC Capital Markets.
The heavily weighted financials and energy groups were up 0.3 percent and 0.6 percent respectively.
Brent crude oil prices rose above $110 a barrel, while U.S. crude rose to $101.72 per barrel on U.S. budget hopes. Meg Energy Corp
Tempering advances was a 1.2 percent drop in materials stocks. Gold miners in particular retreated, with Agnico Eagle Mines Inc
Bullion prices retreated as investors moved away from the safe-haven metal amid prospects of a last-minute U.S. debt deal.
Still RBC's Hand said bullion prices have been very volatile of late. "Gold is becoming very hard to prognosticate," he said.
(Additional reporting by Solarina Ho; Editing by Chris Reese and Nick Zieminski)