The S&P/TSX composite index climbed 40.16 points to 13,621.55 with gains for the day led by the battered gold sector, by far the biggest loser on the Toronto market this year.
The TSX ended 2013 up 9.55 per cent for the year, with the advance racked up over the last five months.
"The back half of the year was really the inflection point," said Craig Fehr, Canadian markets specialist at Edward Jones in St. Louis.
He observed that was the point where the market started to transition from one that was driven by central bank stimulus to an environment where investors started to focus more on economic fundamentals.
"And that's a healthy transition," added Fehr.
The Canadian dollar closed up 0.04 of a cent to 94.02 cents US.
U.S. indexes also ended the year higher as traders digested a mixed bag of data on home prices, consumer confidence and manufacturing.
The Dow Jones industrials rose 72.37 points to a new closing high of 16,576.66, adding up to a gain of 26.5 per cent for 2013. The Nasdaq was ahead 22.39 points to 4,176.59, up 38 per cent this year to its highest level in 13 years. The S&P 500 index was up 7.29 points to 1,848.36 for a gain of 29 per cent for 2013, its best year since 1997.
The gains on the final trading day of the year came as Standard & Poor’s/Case-Shiller 20-city home price index rose 0.2 per cent from September to October, down from a 0.7 per cent increase from August to September, as higher mortgage rates weighed on sales and dampened the housing recovery.
For the year, U.S. home prices reflected big gains in earlier months. They rose 13.6 per cent over the past 12 months, the fastest pace since February 2006 — before the U.S. real estate crash.
Other data showed the Chicago Purchasing Managers Index, a key reading on manufacturing in the American Midwest, slowed during this month, falling to 59.1 from 63.
Also, the U.S. Conference Board said its consumer confidence index for December came in 78.1, up sharply from 72 in November.
TSX gains for the year would have been greater if not for deep losses in the mining sectors. The gold sector fell about 48 per cent for the year while the precious metal has fallen about 28 per cent, the first annual loss since 2000.
Gold prices have taken a big hit this year as the global economy gradually improved and the U.S. Federal Reserve made moves to cut back on its monthly bond purchases, a key area of stimulus.
On Tuesday, the gold sector was the major advancer, up just over two per cent while the February contract on the Nymex shed early losses to move up $1.50 to US$1,202.30 an ounce. Barrick Gold (TSX:ABX) climbed 51 cents to C$18.71.
In addition to the big losses in gold, the base metals component has retreated 21 per cent as an uneven global recovery kept the lid on commodity prices.
The base metals group was also ahead 0.77 per cent on Tuesday with March copper up a penny at US$3.40 a pound. Teck Resources (TSX:TCK.B) was ahead 35 cents to C$27.65.
Outside of the mining sectors, most TSX sectors did quite well for the year.
"Roughly half of the TSX sectors are up double digits or more for the year," said Fehr.
"And when you look at industrials, consumer discretionary, there are some very strong gains and I think the investments that were really tied to fundamental growth, better manufacturing, consumer spending around the world, those are areas that did exceptionally well."
Financials were up 22 per cent for the year. Insurance companies were particularly strong performers as companies benefited from strong stock market gains and rising bond yields.
Industrials also had a good year, up about 35 per cent as railroad stocks shot ahead, helped along in large part by rising shipments of crude oil. Fresh questions about rail transport safety for crude will be asked after a 1.6-kilometre-long train carrying crude oil derailed outside of the town of Casselton, North Dakota on Monday. BNSF Railway Co. said it believes about 20 cars caught fire after its oil train left the tracks Monday afternoon.
The consumer discretion sector jumped about 40 per cent. Many stocks almost doubled over the past 52 weeks, including auto parts makers Magna International (TSX:MG), Linamar Corp. (TSX:LNR) and Martinrea International (TSX:MRE).
The TSX energy sector was ahead 0.47 per cent Tuesday, for a gain of about 9.5 per cent for the year. The February crude contract on the New York Mercantile Exchange closed 87 cents lower to US$98.42 a barrel. Canadian Natural Resources (TSX:CNQ) advanced 36 cents to C$35.94.
Most TSX sectors were positive but the tech sector shed 0.3 per cent. However, BlackBerry (TSX:BB) gained 18 cents to $7.90, a long way from its 52-week high of $18.49. Prices started to plummet mid-year when it became apparent its new lineup of smartphones had widely missed expectations.