But much depends on whether Republicans and Democrats in Washington, D.C., can find a compromise to avoid steep tax increases and significant spending cuts that are set to kick in automatically early in 2013.
Analysts have warned that the shock of going over the so-called fiscal cliff would halt already tepid global economic growth in its tracks and likely push the U.S. back into recession.
"This is very much a binary event that we’re watching unfold," said Andrew Pyle, investment adviser with ScotiaMcLeod in Peterborough, Ont.
"There is no in-between on this. It’s either going to be bad or it’s going to be great for the market."
The TSX is set to finish 2012 trading with a slight gain of about 3.5 per cent following an 11 per cent slide in 2011.
Losses on the resource-heavy Toronto market were highlighted by weakness in the base metals sector, which slid nearly 10 per cent — primarily because of lower demand from China as the government slowed economic growth to bring inflation down from unacceptably high levels.
Similarly, 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 for the Canadian stock markets as miners contended with higher costs for extracting the previous metal. The TSX's global gold index fell about 19 per cent.
The financial sector, another major pillar of the TSX, has fared better. It ends 2012 about 13 per cent higher after the six biggest banks posted record profits — roughly $30 billion for 2012 on about $107 billion in revenue, compared with $25 billion on $98 billion in revenue in 2011.
But analysts warn that growth in Canadian retail banking, a key strength for the sector over the past several years, will likely slow in 2013 amid record consumer debt levels and a cooling housing market.
At the same time, market watchers are confident that U.S. lawmakers will arrive at a framework for avoiding the fiscal crisis by the beginning of 2013 deadline although a comprehensive deal on taxes and spending cuts will likely take longer.
"We’re of the view that there will be some kind of an agreement and at the end of the day, there will be some tax increases and some spending cuts," said Robert Gorman, chief portfolio strategist at TD Waterhouse.
"So you will end up with fiscal drag, which will to some degree likely reduce growth modestly but won’t go over the proverbial cliff."
The eurozone will continue to weigh on global markets. The region's debt crisis has resulted in recessions for several countries that use the euro as governments in Spain, Greece, Italy and Portugal deliver tough austerity measures.
"For anyone out there that’s expecting a big turnaround in the eurozone or anything in Europe in 2013, they probably will be disappointed," said Craig Fehr, Canadian markets specialist at Edward Jones in St. Louis.
"I think it’s going to be a lot more of the same as it relates to Europe and that means slow to no to maybe negative economic growth in the eurozone in 2013."
Even so, there are some real positives for the TSX this year.
The drag on the U.S. economy created by whatever agreement lawmakers come to will be offset in part by the housing sector, which is expected to finally start making a contribution to economic growth.
"That’s one of the key points," said Gorman.
He pointed to a huge drop in housing inventories, which are now down to 6.1 months from a high of 12 months at the worst of the downturn.
He also noted that prices are still off around 30 per cent from the peak reached in 2006 and financing is still ultra-low with a 30-year mortgage going for around 3.5 per cent. Inventories are down quite sharply.
"Historically in the U.S. if you look at the history of coming out of recession, housing has historically contributed fully 13 per cent of all US GDP growth," said Gorman.
"In this cycle, there has been no such contribution and 2013 will be the first of any significance."
Gorman also said the U.S. economy will benefit from a strengthening auto sector.
China is also expected to be a plus for the TSX resource sector as economic growth in the world's second-biggest economy finally started to pick up towards the end of 2012.
Key manufacturing indexes finally moved into expansion territory and there was also positive factory output, retail sales and electricity consumption figures.
"All of these things suggest economic growth could start moving higher as opposed to continuing to slide lower in China, that bodes quite well for the Canadian economy," Fehr says.
"It also bodes well for commodity prices and the resource sector."
After balancing the good and bad expected for 2013, performance on the TSX will be anything but red-hot.
"It will be an OK year," Gorman says.
"In Toronto, I think we will probably do five per cent plus dividends — so five per cent, maybe a touch better."
Also on HuffPost