Wall Street moved higher on Wednesday after an OPEC agreement to limit crude output fuelled a rally in oil and more than offset nervousness about a tight race for the US presidency.

The energy index jumped 4 per cent and was set to have its best day since January after OPEC sources said the group has reached a deal to limit crude output at its policy meeting in November. Oil prices rallied as much as 6 per cent.

“The energy sector has been the biggest drag on earnings for the past year and a half or two years, and if you can get some stability there, all of a sudden earnings start to look a lot better,” said Mark Kepner, managing director at Themis Trading in Chatham, New Jersey.

Chevron climbed 2.66 per cent and Exxon Mobil gained 3.56 per cent. Shares of Caterpillar Inc , which sells heavy equipment to energy companies, jumped 3.79 per cent.

Investors for months have shrugged off the November 8 presidential election, but uncertainty about the election’s outcome has taken centre stage since Monday’s first debate between candidates Donald Trump and Hillary Clinton.

“There is this uncertainty that you don’t know which way the election is going to go,” said Chris Zaccarelli, chief investment officer at Cornerstone Financial Partners.

US stocks reversed earlier losses and moved higher following news of the OPEC agreement.

At 2:54 pm ET, the Dow Jones industrial average was up 0.56 per cent to 18,329.69 points and the S&P 500 had gained or 0.44 per cent to 2,169.33. The Nasdaq Composite added 0.13 per cent to 5,312.64.

Seven of the 11 major S&P 500 indexes were higher. Telecom services was down 1.14 per cent, the steepest of the decliners.

Nike dropped 4.23 per cent after the shoemaker’s orders missed analysts’ estimates for the third time in a row.

Paychex dropped 4.35 per cent after the payroll processor lowered its full-year profit forecast.

Advancing issues outnumbered declining ones on the NYSE by a 2.82-to-1 ratio; on Nasdaq, a 1.48-to-1 ratio favoured advancers.

The S&P 500 posted 16 new 52-week highs and 3 new lows; the Nasdaq Composite recorded 86 new highs and 35 new lows.

comment COMMENT NOW