TORONTO -- Canada's biggest stock market headed higher Monday, buoyed by strength from the metals, materials and energy sectors, as investors seemed to shrug off global uncertainty following the abrupt resignation of Italy's premier.

The S&P/TSX composite index in Toronto gained 42.65 points at 15,095.17.

The rise came as the January crude oil contract added 11 cents at US$51.79 per barrel, capping off a fourth straight day of gains.

Last week, the OPEC cartel announced a deal that would see its members and some non-members curb production in the new year as part of an effort to lift crude prices.

The Canadian dollar, which often follows the direction of oil prices, gained 0.04 of a U.S. cent at 75.32 cents US.

New York markets were also positive with the Dow Jones industrial average rising to a new record, climbing 45.82 points to 19,216.24, while the S&P 500 added 12.76 points at 2,204.71. The Nasdaq composite rallied 53.24 points at 5,308.89.

On Sunday, Italian voters resoundingly rejected proposed changes to the nation's constitution, resulting in political and economic uncertainty for Europe's fourth-largest economy.

Italian Premier Matteo Renzi, who was a big promoter of the changes, immediately announced his resignation. His replacement is yet be named.

Portfolio manager Kash Pashootan said the fact that global stock markets seemed unaffected by the news shows how resilient investors are.

"Traditionally, surprise outcomes create uncertainty and the markets tend to sell off. In 2016, we've seen surprise outcomes are acceptable and encouraged if they have a promise of change attached to them," said Pashootan from First Avenue Advisory, a Raymond James company.

"That's what we're seeing play out today with Italy."

He noted that stock markets have not only survived several uncertain political and economic outcomes this year -- including the Brexit vote, the victory of U.S. president-elect Donald Trump and the recent OPEC output deal -- but have rallied higher.

The concern is that the markets can be overbought due to so much optimism being priced into it that the evidence to support the gains just aren't there.

Pashootan gave U.S. infrastructure stocks as an example of a sector that has gained following Trump's election, even though the individual company's balance sheets may not support the rise.

"There is a strong machine behind the scenes that's creating a healthy appetite for risk, helping equities move higher," he said.

"The flip side of all of this, when you have so much optimism priced in, (is that) the markets can certainly get ahead of themselves."

In other commodities, the January contract for natural gas climbed 22 cents at US$3.65 per mmBTU, March copper contracts jumped seven cents at US$2.70 per pound, and February gold contracts fell $1.30 to US$1,176.50 per ounce.

-- With files from The Associated Press