Energy companies led U.S. stocks slightly higher Wednesday as the price of oil recovered from an early slide. Investors were also weighing the latest company earnings and deal news.

At the close on Wall Street, the Dow Jones industrial average was up 42.7 points, about 0.2 percent, at 18,096.3. The Standard & Poor’s 500 index gained 1.6 points, about 0.1 percent, to 2,102.4. The Nasdaq composite added 7.8 points, about 0.2 percent, to 4,948.1.

advertisement | advertise on newsday

CRUDE ENERGY: U.S. crude reversed an early morning slide. As markets closed, the price of benchmark U.S. crude oil was up $1.35 about 3.2 percent, at $43.82 a barrel in trading on the New York Mercantile Exchange. In London, the price of the international standard, Brent crude, gained $1.41, about 3.2 percent, to $45.44 a barrel.

THE QUOTE: After several weeks of moving in different directions, the stock market appears to be getting more closely tied to the fluctuations in oil prices. “Oil is what’s been driving the market lately,” said Chris Gaffney, president of EverBank World Markets.