NEW YORK (TheStreet) -- Stocks trimmed gains by mid-morning Wednesday, struggling to remain in positive territory after an earlier bounce.  

The S&P 500 gained 0.14%, the Dow Jones Industrial Average added 0.07%, and the Nasdaq climbed 0.29%.

Crude oil extended a rally after U.S. inventories dropped 2.2 million barrels over the past week, the second straight weekly decline in stockpiles. Economists had expected an increase of 400,000 barrels. The Energy Information Administration's weekly data follows from Tuesday's updated 2015 estimates that U.S. oil demand will increase and production will slow. West Texas Intermediate added 1.1% to $61.44 a barrel on Wednesday.

DuPont (DD) was lower after no Trian Fund Management nominees were elected to the board at DuPont's annual shareholder meeting. Activist investor Nelson Peltz of Trian had tried for a seat, even though the company had previously refused and rejected his demands to split the company into two.

Business inventories in the U.S. in March came in slightly lower than expected, gaining just 0.1% compared to 0.2% growth in the prior month. Economists had expected growth of 0.2%. 

U.S. retail sales in April were unchanged, falling below an expected 0.3% increase after 0.9% growth in March. Sales excluding autos rose 0.1%, according to the Commerce Department, though fell short of forecasts for 0.4% growth.

However, optimism in Europe helped to boost sentiment on Wall Street. The four largest economies in the eurozone -- Germany, France, Italy and Spain -- recorded growth in the first quarter, the first time all have been positive since 2010. The overall eurozone economy grew 0.4%, up from 0.3% in the fourth quarter.

Macy's (M) fell 2.4% after earning 56 cents a share in its recent quarter, 6 cents below estimates. Sales of $6.23 billion were down nearly 1% from a year earlier and missed forecasts by $90 million.

Pall (PLL) and Danaher (DHR) shares moved higher after Danaher agreed to acquire the filtration system manufacturer for $127.20 a share, or a total $13.8 billion. Danaher also announced that after the acquisition the company will split into two independent, publicly traded companies, one focusing on science and technology and the other on industrials.

New York Times (NYT) shares gained as the news organization prepares to begin publishing articles directly to Facebook's (FB) newsfeed on Wednesday. Buzzfeed, Comcast's (CMCSA) NBC News and National Geographic are also reportedly in talks to develop similar partnerships.

GoDaddy (GDDY) reported a quarterly loss of 34 cents a share on revenue of $376.3 million. The company also offered second-quarter sales guidance of $390 million to $395 million and full-year revenue guidance of $1.595 billion to $1.605 billion, above consensus of $1.59 billion.

General Electric (GE) shares were on watch on news as the industrial conglomerate is reportedly putting its $5 billion Japanese commercial finance operation on the sale block. The company has been working to slim down its GE Capital division.

Delta Air Lines (DAL) gained more than 2% after approving a new $5 billion share repurchase program. The new program will combine with existing buybacks to provide more than $6 billion to shareholders over the next two years.

If you liked this article you might like

Bill Ackman Pledges He'll Be Back Next Year If ADP Doesn't Perform

Bill Ackman Pledges He'll Be Back Next Year If ADP Doesn't Perform

Why Bayer's $66 Billion Takeover of Monsanto Probably Won't Happen Until 2018

Why Bayer's $66 Billion Takeover of Monsanto Probably Won't Happen Until 2018

DowDupont Closes Higher in First Day of Trading, Company Still Faces Challenges

DowDupont Closes Higher in First Day of Trading, Company Still Faces Challenges

Apple Is the Tom Brady of Stocks: Cramer's 'Mad Money' Recap (Thursday 8/31/17)

Apple Is the Tom Brady of Stocks: Cramer's 'Mad Money' Recap (Thursday 8/31/17)

FMC Stock's Impressive Rally Has Another 20% to Gain: Jim Cramer

FMC Stock's Impressive Rally Has Another 20% to Gain: Jim Cramer