* TSX ends up 52.99 points, or 0.43 percent, at 12,334.34 * Energy and financial shares provide biggest boost * Eight out of the 10 main index sectors end higher By Alastair Sharp TORONTO, Dec 18 Canada's main stock index rose on Tuesday, led higher by heavyweight financial and energy shares as optimism swelled that U.S. talks to avoid the budget "fiscal cliff" were making headway. Support for House of Representatives Speaker John Boehner among Republican lawmakers held as both he and President Barack Obama softened their positions in talks to avert the "fiscal cliff" of automatic tax hikes and spending cuts set to come into force in the new year. "There seems to be between the two leaders some rapprochement, giving hopes of some sort of agreement coming up," said John Ing, president of Maison Placements Canada. Signs of progress, or lack thereof, in the U.S. talks have prompted markets to swing widely in recent weeks as economists have warned that failure to reach a deal could push the world's largest economy back into recession. As a deal looks more likely, investors appear less concerned by minor setbacks. "I don't think the stock market is that concerned about it," said Paul Harris, portfolio manager at Avenue Investment Management. "When there are signs a deal is going to come, the market goes up a lot more." The energy sector, up 1.2 percent, played the biggest role in leading the market higher, lifted by a rise in oil prices. In the group, Suncor Energy Inc added 1.5 percent to C$32.65, and Canadian Natural Resources Ltd gained 2.2 percent to C$28.25. The Toronto Stock Exchange's S&P/TSX composite index ended up 52.99 points, or 0.43 percent, at 12,334.34. Eight of its 10 main sectors ended higher. The index has gained more than 4 percent since a mid-November low. Financial stocks were up 0.9 percent as investors moved into a sector seen as relatively cheap and offering a promising yield outlook. Royal Bank of Canada, the country's largest lender, added 1.3 percent to C$59.85. Toronto-Dominion Bank gained 1.1 percent to C$82.12, and Bank of Nova Scotia rose 1.1 percent to C$57.28. Insurer Manulife Financial Corp jumped 3.3 percent to C$13.43. "Financials are doing better because the economy in Canada and the United States is actually in pretty good shape," Harris said. "There is a perception they are tied to the equity markets, and the equity markets have had a decent run in the last little while." The index's materials sector - which includes miners - was the most heavily weighted declining sector, falling as the price of bullion sank almost 2 percent, in part because its safe-haven luster was tarnished by optimism that a budget deal will be reached in the United States.