Markets are ending 2017 in a party mood after a pick-up in global growth boosted corporate profits and commodities, while tame inflation kept central banks from snatching away the punch bowl of easy monetary policy.

MSCI's world equity index, which tracks 47 countries, inched up 0.13 per cent, and was poised to add a 14th straight month of gains to put it at an all-time high. The index gained 22 per cent for the year.

The Toronto Stock Exchange entered its last trading session of the year with a freshly-notched record under its belt. Thursday's all-time high of 16,221.95 contributed to a better-than six per cent gain on the year, which puts the Composite Index ahead of stocks in Sri Lanka and Slovakia, but leaving it behind the likes of Shanghai and Bucharest. 

Canada's main stock index ended slightly lower on Friday, as gains for banks and gold miners were offset by losses among base metal miners and some energy names.

The Toronto Stock Exchange's S&P/TSX composite index unofficially closed down 12.82 points, or 0.08 per cent, at 16,209.13. It gained 1 per cent on the week and 6 per cent in 2017.Emerging markets have led the charge with gains of 34 per cent.

Hong Kong surged 36 per cent, South Korea climbed 22 per cent, India rose 28 per cent and Poland made 27 per cent in local currency terms.

Japan's Nikkei and the S&P 500 are both ahead by almost 20 per cent, while the Dow has risen by a quarter. In Europe, the UK FTSE has lagged behind a little with a rise of nearly 8 per cent.

Craig James, chief economist at fund manager CommSec, said of the 73 bourses it tracks globally, all but nine have recorded gains in local currency terms this year.

"For the outlook, the key issue is whether the low growth rates of prices and wages will continue, thus prompting central banks to remain on the monetary policy sidelines," said James.

"Globalization and technological change have been influential in keeping inflation low. In short, consumers can buy goods whenever they want and wherever they are."

Yet after a strong run-up there may be little room for error. U.S. stock markets opened lower on Friday, trimming their strong gains for the year.\

The Dow Jones Industrial Average fell 118.29 points, or 0.48 per cent, to 24,719.22, the S&P 500 lost 13.93 points, or 0.52 per cent, to 2,673.61 and the Nasdaq Composite dropped 46.77 points, or 0.67 per cent, to 6,903.39. 

"While the broader economic outlook appears increasingly rosy, as captured by measures of consumer and business confidence, the more cautious nature of investors hints at a concern that markets may have already discounted much of the good news," said Michael Metcalf, State Street's head of global macro strategy.

One of the early issues for next year will be an Italian election scheduled for March 4. As things currently stand the vote is expected to produce a hung parliament that could ultimately catapult the 81-year-old, four-times premier Silvio Berlusconi back to center stage.

Benchmark 10-year Italian government bond yields rose to fresh two-month highs on Friday at 1.99 per cent. They started the year at just over 1.8 per cent but are still under the highs of 2.6 per cent hit back in March.

DOLLAR DISAPPOINTS

U.S. dollar bulls have not been fortunate this year. The widely held assumption at the start of the year was that, with the Federal Reserve set to raise interest rates further and lawmakers poised to cut taxes, the only way for the dollar was up.

Yet even though the Fed delivered on its three promised hikes and a tax bill was signed into law last week, the currency has failed to benefit.

Measured against its major peers the dollar has shed nearly 10 per cent this year, putting it on track for its biggest annual loss since 2003. The dollar index fell 0.44 per cent for the day.

Among the winners have been emerging markets and the euro , which is ahead almost 14 per cent for the year and has turned in its best annual performance since 2003.

The dollar's loss has been a boon for commodities priced in the currency, which have also benefited from a synchronized pick up in global trade and surprisingly strong demand from China.

Everything from coal to iron ore has reaped gains, with copper a stand-out performer in part due to expectations of rising demand for the mass production of electric vehicles.

The industrial metal is turning in its largest annual gains since the global financial crisis ebbed in 2009, but moved a bit off its four-year highs on Friday. Copper futures last lost 0.51 per cent to nearly US$7,252 a tonne.

Gold has struggled somewhat this year against a background of subdued global inflation, but at US$1,302.58 an ounce was still on track to end 2017 with gains of more than 12 per cent.

Oil prices were near their highest in 2-1/2 years after data showed strong demand for crude imports in China and a surprise fall in U.S. production.

U.S. crude rose 0.45 per cent to US$60.11 per barrel and Brent was last at US$66.47, up 0.47 per cent on the day.