TORONTO — The Toronto stock market ended 2012 trading with a solid gain as U.S. President Barack Obama offered fresh hope that some kind of a deal was in the works to blunt the worst of automatic tax hikes and spending cuts set to take effect Jan. 1.However, congressional leaders said after makets closed that a vote would be pushed off until Tuesday at the earliest.The S&P/TSX composite index gained 117.41 points to 12,433.53 as the TSX also found support from the resource sector in the wake of Chinese data that showed manufacturing growth in December at its strongest in 18 months.The TSX Venture Exchange was ahead 19.46 points to 1,221.3.The Canadian dollar closed up 0.16 of a cent at 100.51 cents US.Economists fear the double-barreled hit of tax hikes and spending cuts — or going over the fiscal cliff as it has been dubbed — could push the U.S. back into recession if they are allowed to stand. U.S. indexes charged ahead after Obama told a news conference that an emerging deal would extend tax credits for families with children and for clean energy companies while also extending unemployment insurance to two million Americans.He said he would have preferred “a more comprehensive deal that solved our budget problems in a balanced and a responsible way….but that is a bit too much to hope for now.”And, while he cautioned that Democrats and Republicans negotiators were close to a deal, “they’re not there yet.”That was confirmed later Monday when House leaders said they would miss the midnight Monday night deadline to vote on measures to avoid the fiscal cliff. It also remained unclear whether the Senate would vote.However, Congress could pass later legislation retroactively blocking the tax hikes and spending cuts.The Dow Jones industrials surged 166.03 points to 13,104.14 amid the earlier optimism. The Nasdaq rose 59.2 points to 3,019.51 and the S&P 500 index gained 23.76 points to 1,426.19.Markets got an extra lift about an hour after Obama spoke when Senate Republican leader Mitch McConnell said it was time to decouple the major issues of tax hikes and spending cuts.The emerging deal would raise tax rates on family income over US$450,000 and individual income over $400,000 a year and increase the estate tax rate.Stock indexes had held up well throughout December, with traders inclined to think that Republicans and Democrats would arrive at a compromise, likely at the last minute. As a result, they have thought that the potential damage from higher taxes and the spending cuts would be limited.Still, the resource-heavy TSX ended the year with a gain of only four per cent, reflecting a slowing Chinese economy during much of the year and worries about how much of a hit the U.S. economy would take from steps to cut the huge American deficit.“The highlight really was that you had the commodity sectors underperforming,” said Norman Raschkowan, North American strategist at Mackenzie Financial Corp.“The energy sector and the materials sector really didn’t give anything to the market. And without them, it’s hard for the Canadian market to really post any sort of impressive result.”Losses on the Toronto market were highlighted by a slide of almost nine per cent slide in the base metals sector, primarily because of a sharp drop in commodity demand from China as the government put the brakes on the economy in order to bring inflation down from unacceptably high levels. And the energy sector sustained a drop of about eight per cent as slowing economic conditions left the world awash in crude oil.Gold stocks were also a significant drag as miners contended with higher costs for extracting the precious metal. The TSX’s global gold index fell about 18%.But Raschkowan noted that production costs were only one reason for the slide in the gold sector. “The other factor is that people were anticipating that with gold bullion, as high as it was this year (holding steady around US$1,600 an ounce), that gold companies would be significantly increasing the return of cash to shareholders,” he said.“And the companies that did have bigger dividend increases held up better.”However, the other major pillar of the TSX, the financial sector, ended 2012 with a jump of around 12%.“Part of that was obviously the insurance companies, which got so beaten up in 2011 and came back because people came to appreciate just how much progress they had made in addressing the fundamental problems that they had in their balance sheets,” said Raschkowan.For example, Manulife Financial (TSX:MFC) came back from a 52-week low of $10.18 to close the year at $13.51.“The other highlight was clearly how the banks did in a relatively challenging environment, (which) reflected I think more the broad Canadian economy” as the banks had to deal with a lot of negative sentiment towards housing, he said.The big six banks posted record profits — roughly $30-billion for 2012 on about $107-billion in revenue compared to $25-billion on $98-billion in revenue in 2011.The TSX has also been under pressure from the ongoing government debt crisis in Europe, which has sent much of the 17-country eurozone into recession.U.S. markets have fared better with the Dow industrials up about seven per cent. The tech-heavy Nasdaq is ahead 15.9%, but off the highs of the year amid a drop of more than 20% in Apple Inc. shares in the last quarter.The base metals sector led TSX advancers Friday, up 2.4% while copper prices rose as the HSBC China manufacturing Purchasing Managers’ Index rose to a final reading of 51.5, the best reading for the data since May 2011. That was an upward revision from the preliminary 50.9 result and an improvement from November’s PMI of 50.5.The March copper contract was up six cents to US$3.65 a pound. China is the world’s biggest consumer of copper, which is viewed as an economic barometer as it is used in so many applications. Teck Resources (TSX:TCK.B) rose $1.08 to $36.15 while First Quantum Minerals (TSX:FM) advanced 71 cents to $21.91.Gold stocks also headed higher as bullion prices also improved with the March contract ahead $19.90 to US$1,675.80 an ounce. Goldcorp Inc. (TSX:G) climbed $1.12 to $36.57 while Iamgold (TSX:IMG) was ahead 41 cents to $11.39.The energy sector was ahead 1.09% as oil prices shook off early losses and the February contract on the New York Mercantile Exchange gained $1.02 to US$91.82 a barrel. Suncor Energy was up 49 cents to $32.71.Telecoms were the leading decliner, with Telus Corp. (TSX:T) down 34 cents to $65.10.