NEW YORK (AP) -- Energy companies powered to big gains Wednesday, leading the broader stock market higher, on reports that OPEC nations were moving closer to an agreement to cut oil production.
Stocks switched between gains and losses for most of the day, and most industries did not move much. Energy companies surged at 2 p.m. Eastern time on reports that a deal was close. A two-year slump in oil prices has decimated profits at energy companies. The energy sector made its biggest gain since January.
After stock trading closed, OPEC said it had reached a preliminary deal to reduce production for the first time in eight years.
"It just creates a lot of optimism that the worst is over for investors," said Brian Youngberg, energy analyst at Edward Jones.
The Dow Jones industrial average rose 110.94 points, or 0.6 percent, to 18,339.24. The Standard & Poor's 500 index added 11.44 points, or 0.5 percent, to 2,171.37. The Nasdaq composite edged up 12.84 points, or 0.2 percent, to 5,318.55.
A little more than two years ago, a barrel of oil cost around $100. But a huge supply glut built up as the U.S. and other countries produced more and more oil and the global economy slowed, which hurt demand. Oil hit a low of $26 a barrel in February and has traded between $40 a $50 a barrel since April, but investors doubt the price will rise further without limits on production. OPEC produces more than a third of the world's oil.
"The industry needs higher oil prices," said Youngberg.
Benchmark U.S. crude jumped $2.38, or 5.3 percent, to $47.05 a barrel in New York. Brent crude, the international standard, rose $2.72, or 5.9 percent, to $48.69 a barrel in London.
Exxon Mobil picked up $3.66, or 4.4 percent, to $86.90 and Chevron leaped $3.17, or 3.2 percent, to $102.15.
Oil prices jumped 3 percent Monday and then fell 3 percent Tuesday as hopes for a production deal rose and fell, and oil repeatedly changed course Wednesday as well.
Mining and industrial companies also climbed. The Dow was aided by a big gain for heavy machinery maker Caterpillar, which climbed $3.71, or 4.5 percent, to $86.59.
Phone companies suffered some of the largest declines. AT&T fell 61 cents, or 1.5 percent, to $40.85 after a UBS analyst downgraded the company to "Neutral" from "Buy." Analyst John Hodulik said profits will get squeezed as the companies offer trade-in deals to try to win customers. He cut his profit forecast for Verizon, which lost 43 cents to $52.06.
AT&T has climbed 19 percent this year and Verizon has risen 13 percent as investors sought stocks that pay big dividends while bond yields remain low.
Nike's profit and sales were stronger than analysts expected, but the athletic apparel maker's stock slipped $2.09, or 3.8 percent, to $53.25 as investors worried about challenges including slower orders in North America. Credit Suisse analyst Christian Buss said orders in that market are growing at their slowest pace in five years as competition increases. Nike is down 15 percent this year, more than any other stock on the Dow Jones industrial average.
Stockholders in SABMiller approved its combination with AB InBev. That vote was one of the last hurdles in the giant beer merger, which has already been cleared by regulators. AB InBev stock rose $1.56, or 1.2 percent, to $133.44. As part of the deal, Molson Coors will gain full ownership of its joint venture with SABMiller, MillerCoors. Its stock climbed $2.08, or 1.9 percent, to $109.61.
Mattress maker Tempur Sealy International tumbled after the company said third-quarter sales aren't meeting its expectations. It cut its guidance and said it expects revenue to fall as much as 3 percent this year. That suggests sales of no more than $3.12 billion, while FactSet says analysts expected $3.23 billion on average. Tempur Sealy stock dropped $16.68, or 22.4 percent, to $57.77.
Deutsche Bank traded higher after the German bank said it will sell a life insurance subsidiary and emphasized it is not seeking government aid. The company is selling its Abby Life unit to Phoenix Life Holdings for about $1.2 billion. Investors have been worrying about Deutsche Bank's ability to pay a $14 billion claim from the U.S. government. Its U.S.-listed stock, which is down by half this year, rose 38 cents, or 3.2 percent, to $12.30 Wednesday.
In other energy trading, wholesale gasoline jumped 8 cents, or 6 percent, to $1.48 a gallon. Heating oil gained 8 cents, or 5.8 percent, to $1.49 a gallon. Natural gas fell 4 cents to $2.95 per 1,000 cubic feet.
Bond prices slipped. The yield on the 10-year Treasury note rose to 1.57 percent from 1.56 percent. The dollar rose to 100.75 yen from 100.27 yen and the euro inched down to $1.1214 from $1.1221.
Gold fell $6.70 to $1,323.70 an ounce. Silver shed 4 cents to $19.12 an ounce. Copper added 2 cents to $2.19 per pound.
The CAC-40 in France added 0.8 percent while Germany's DAX rose 0.7 percent. In Britain, the FTSE 100 gained 0.6 percent. Tokyo's Nikkei 225 index fell 1.3 percent and Hong Kong's Hang Seng was unchanged. Seoul's Kospi added 0.9 percent.
This story has been updated to correct the name of the UBS analyst who covers Nike.