Wall Street rallies as OPEC reaches output deal

(Reuters) - Wall Street ended higher on Wednesday after an OPEC agreement to limit crude output fueled a rally in oil and more than offset nervousness about a tight race for the U.S. presidency.

The energy index had its best day since January, climbing 4.34 percent after OPEC sources said the group reached a deal to cut its oil production for the first time since 2008. Oil prices rallied as much as 6 percent.

A slump in oil prices has caused steep earnings declines and losses for U.S. energy producers for several quarters. S&P 500 energy companies on average are expected to post a 66 percent drop in third-quarter earnings, according to Thomson Reuters data.

"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.

Investors for months had shrugged off the Nov. 8 U.S. presidential election, but uncertainty about the election's outcome has taken center 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.

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

The Dow Jones industrial average rose 0.61 percent to end at 18,339.24 points and the S&P 500 gained 0.53 percent to 2,171.37.

The Nasdaq Composite added 0.24 percent to 5,318.55.

Seven of the 11 major S&P sectors were higher. Telecom services fell 1.04 percent, the steepest of the decliners.

Some investors said that the oil deal would have only a limited ability boost crude prices, which earlier this year hit decade lows.

"There is still plenty of oil and fossil fuels in general that could come back on. The very fact you do have the U.S. as the marginal producer, it caps the oil price," said Jeff Weniger, senior portfolio strategist at BMO Private Bank in Chicago.

Nike dropped 3.78 percent after the shoemaker's orders missed analysts' estimates for the third time in a row.