Stocks gave up an early gain and drifted mostly lower on Wall Street as investors continue digesting a steady flow of corporate earnings and more in Wednesday’s Stock Market Update.

Energy and communications companies took some of the biggest losses Wednesday. Exxon Mobil lost 1.9% and AT&T fell 4.1%.

Communications companies also helped pull the market lower, offsetting gains in technology and other sectors. Bond prices were rising as traders took a more defensive approach.

Investors continued to wade through a steady flow of corporate earnings. Analysts have been expecting a contraction in first-quarter corporate profits, but the results so far have been mostly solid. That trend continued with profit beats from e-commerce company eBay and industrial giant General Dynamics.

“The pace of earnings beats is at a very nice level, certainly exceeding diminished expectations,” said Eric Wiegand, senior portfolio manager for Private Wealth Management at U.S. Bank. “The strength of the dollar has been, perhaps, a little bit of a weight on markets today.”

Anadarko surged as Occidental tries to push out Chevron in a bidding war for the company. Boeing rose despite a disappointing first quarter report and a pulled forecast because of its troubled 737 Max.

Traders have been feeling more confident that the economy will continue to grow steadily after the Federal Reserve indicated it would hold off on raising interest rates. However, there are still threats to the economy from international trade disputes.

The U.S. and China are still embroiled in a trade war that has raised costs for several companies. Others, like Caterpillar, are seeing lower revenue in Asia because of the dispute.

A U.S. delegation will visit Beijing next week to continue trade negotiations. Chinese officials will visit Washington for more talks starting May 8. They are aimed at resolving a dispute over Beijing’s technology policies and other issues that have clouded the economic outlook and shaken financial markets.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 fell 6 points, or 0.2%, to 2,927. The Dow fell 59 points, or 0.2%, to 26,597. The Nasdaq fell 18 points, or 0.2%, to 8,102.

More stocks rose than fell on the New York Stock Exchange.

Major European stock indexes finished mostly lower.

THERE WILL BE BIDS: Occidental Petroleum started a bidding war for Anadarko Petroleum as the oil industry’s largest companies try to secure their positions in the oil-rich Permian Basin.

Occidental fell 1% after it offered $57 billion in cash and stock for Anadarko Petroleum. Anadarko surged 12% and Chevron fell 2.9%.

ENERGY SLUMP: Energy stocks fell more than the 10 other S&P 500 sectors, losing 1.5%. National Oilwell Varco led the way lower, shedding 4.3%.

The slide came as the price of U.S. crude oil snapped a three-day winning streak.

Benchmark U.S. crude was fell 0.6% to settle at $65.89 per barrel. Oil had been climbing recently since dropping below $43 in late December. Brent crude rose 0.1% to $74.57 per barrel.

SLUGGISH ROOMBA: IRobot plunged 21.8% after the robotics company’s revenue fell short of Wall Street forecasts.

The company is best-known for its robotic Roomba vacuum. It beat profit forecasts for the quarter and gave investors solid guidance for the year, but it wasn’t enough to overcome disappointing revenue growth.

REACHING THE CLOUDS: SAP soared to an all-time high after activist investor Elliott Management revealed a $1.3 billion investment in the German software company. The company’s U.S.-listed stock rose 12.7%.

The disclosure came in a note from Elliott praising the company’s decision to undergo a strategic review. The company makes software used by business to run their operations. It has been focusing more on cloud computing.

The stake was revealed as the company reported solid first-quarter profit and revenue results.

ADD TO CART: E-commerce company eBay rose 5.3% after raising its full-year sales and profit forecast. Active buyers grew by 4% during the first quarter, pushing revenue and profit beyond Wall Street forecasts. The company has been facing increasingly tougher competition from Amazon and traditional retailers that have beefed up their online presences.

© The Associated Press. All rights reserved.