* TSX up 36.20 points, or 0.28 percent, at 12,824.59
* Banks and energy companies lead gains, miners weigh
TORONTO, Oct 1 (Reuters) - Canada's main stock index was marginally higher on Tuesday as the market largely shrugged off a partial shutdown of the U.S. government, though many of the index's biggest mining stocks fell.
Investors are getting wise to Washington politics and do not expect the shutdown, which could put up to 1 million workers on unpaid leave, to last too long, said Keith Richards, portfolio manager and technical analyst at ValueTrend Wealth Management in Barrie, Ontario.
If the shutdown were prolonged, it might encourage the U.S. Federal Reserve to maintain its stimulus program for a longer period, which would also boost stocks, he said.
"If there is a longer shutdown it would slow the economy and therefore reduce the (Fed) taper talk that's been the prevalent fear out there," Richards said, adding that a looming fight over raising Washington's borrowing authority was much more dangerous. "We still have the debt ceiling nonsense coming up. That's a bigger issue than a government shutdown."
The Toronto Stock Exchange's S&P/TSX composite index was up 36.20 points, or 0.28 percent, at 12,824.59 at midmorning. It had opened in the red after hitting a two-week low on Monday.
"I'm personally not getting too excited over any little rally we get today. It's too early to get too bullish on this market," Richards said.
Valeant Pharmaceuticals International Inc had the single biggest positive impact on the index, up 3.1 percent at C$110.70.
The index's heavyweight energy sector was up despite a drop in oil prices. In the group, Suncor Energy added 1.2 percent to C$37.28. The financial sector was also higher, with Royal Bank of Canada up 0.6 percent at C$66.41.
Mining companies were the main drag, with Barrick Gold down 3 percent at C$18.60, and Goldcorp Inc off 2.4 percent at C$26.17. The price of gold fell below $1,300 per ounce to its lowest since early August on Tuesday as some investors saw the U.S. standoff as likely temporary and drove safe-haven bullion lower.