​Canada's largest stock market declined Monday while the loonie gained, as oil prices soared to their highest level in nearly a year and a half amid optimism about a surprise weekend deal by non-OPEC members.

The January crude oil contract gained $1.33 to settle at US$52.83 a barrel, a record price for this year. The last time crude was at this level was on July 14, 2015 when it hit US$53.04 a barrel.

On Saturday, Russia and 10 other nations agreed to scale back production by 558,000 barrels a day for six months, following a Nov. 30 decision by OPEC members to decrease supply by 1.2 million barrels a day over the same time period.

Craig Fehr, a Canadian markets strategist with Edward Jones, says that although OPEC and non-OPEC members want the same goal of higher oil prices, it's not a sure thing that they'll stick to their quotas.

"This is only half the story. The next leg is the execution of these freezes of cuts, which might not be as seamless as the deal looks like on paper," he said from St. Louis.

But their mere agreement to participate shows how desperate they are to get prices to a more profitable level, he noted.

In mid-2014, a barrel of oil hovered around the US$100 mark, dropping to below US$30 at the start of this year.

The Canadian dollar, which often trades in tandem with crude, gained 0.27 of a U.S. cent at 76.14 cents US.

The spike wasn't enough to lift Canada's largest stock market, as the S&P/TSX composite index fell 24.50 points at 15,287.70, weighed by losses from the industrials sector.

On Wall Street, the Dow Jones industrial average gained 39.58 points at 19,796.43 to a record high. Meanwhile, the S&P 500 slipped 2.57 points at 2,256.96 and the Nasdaq composite index fell 31.96 points to 5,412.54.

Fehr said the rally in equity markets have been "relentless" in the past several weeks, and investors should not be surprised if a pullback is coming.

"It's reasonable to expect that there is going to be pauses along the way," he said.

"Investors should expect to see a little more volatility as we turn the page into 2017. This bull market is very much in tact, but it's not going to be a steady march higher as we've seen since the U.S. election."

In other commodities, January natural gas contracts dropped 24 cents at $3.51 per mmBTU, February gold contracts gained $3.90 at US$1,165.80 an ounce and March copper contracts fell three cents at US$2.62

Keep reading