Major stock indices in Canada and the United States finished higher Monday as investors seemed to shrug off a number of emerging geopolitical risks.

In Toronto, the S&P/TSX composite index climbed 91.59 points to 15,629.47, helped largely by a 1% jump from the energy sector.

Investors were buoyed amid news that OPEC’s most influential member, Saudi Arabia, and non-OPEC member Russia have both said they want to extend oil production cuts through the first quarter of 2018 — in a move the two major producers say would support the market price.

The two countries say they plan on meeting with other producers to get them on board with the agreement before the scheduled OPEC meeting May 25 in Vienna.

In late November, OPEC agreed to cut production by 1.2 million barrels per day, the first such reduction agreement since 2008. The following month, 11 non-OPEC oil-producing countries pledged to cut another 558,000 bpd, bringing the overall reduction to 1.8 million bpd.

The move is an effort by oil producers to boost prices, as crude futures trade around US$50 a barrel, less than half their level from early 2014, though above the low of below US$30 in early 2015.

Canadian markets strategist Craig Fehr said this news will help decrease volatility in crude prices.

“It looks like there is some stability in oil prices in the near term and it’s going to come from the fact that major producers overseas appear to be committed to trying to prop up prices,” said Fehr, who works at Edward Jones in St. Louis.

The June crude contract was up US$1.01 at US$48.85 per barrel, but the June natural gas contract was down eight¢ at US$3.35 per mmBTU.

The higher oil price helped the Canadian dollar, which finished 0.39 of a U.S. cent higher to an average value of US73.31¢.

Other commodities were also positive as the June gold contract climbed US$2.30 at US$1,230 an ounce and the July copper contract was up US2¢ at US$2.54 a pound.

In New York, the Dow Jones industrial average gained 85.33 points to 20,981.94.

The broader S&P 500 index added 11.42 points at 2,402.32, while the tech-heavy Nasdaq composite index was ahead 28.44 points to 6,149.67 — both finishing with record closes.

Fehr said markets seemed to be ignoring the growing geopolitical risks from a “ransomware” cyberattack that spread to thousands of computers worldwide, to bubbling tensions between the U.S. and North Korea.

Instead, investors are continuing to stay focused on fundamentals such as strong corporate earnings growth and economic data.

“It’s been a little bit too quiet on the equity front. We’re due for a little more volatility because I don’t think equity markets are going to be willing to ignore these geopolitical risks forever,” he said.

“The longer we go without any real drama on the equity markets, the more painful it is going to feel when we do get a pullback.”

With files from The Associated Press