Stocks recovered to session highs by mid-afternoon Wednesday as crude oil surged and investors pushed a Wall Street rally into day two.

The S&P 500 added 0.73%, the Dow Jones Industrial Average rose 1%, and the Nasdaq gained 0.66%. The Dow returned to positive territory for the month.

Crude oil prices held onto gains after an official weekly read on inventories confirmed an expected decrease. U.S. crude stocks fell by 4.2 million barrels in the past week, according to the Energy Information Administration, backing up an American Petroleum Institute which found that inventories fell by 5.1 million.

West Texas Intermediate crude oil rose 1.9% to close at $49.56 a barrel Wednesday, its highest settlement since October 9. 

A rally in crude pushed the energy sector higher on Wednesday. Major oilers Exxon Mobil (XOM) - Get Report , Royal Dutch Shell (RDS.A) , PetroChina (PTR) - Get Report  and Chevron (CVX) - Get Report were higher, while the Energy Select Sector SPDR ETF (XLE) - Get Report rose 1.5%.

U.S. stocks enjoyed a big rally on Tuesday as Wall Street finally came to grips with the potential for an interest rate hike in June following a week of worry. A June rate hike has odds of roughly 30%, according to CME Group, after starting the month at less than 10%. 

Current labor data suggests it is time for the central bank to implement another rate hike, St. Louis Federal Reserve President James Bullard told CNBC, adding to the chorus of Fed members who support a hike sooner than later. Bullard noted that June nor July were sure deals and that the Fed would continue to analyze incoming data.

"While we disagree that lackluster, moderate conditions 'warrant' a second rate increase in June, policy officials appear well-positioned to offer a near-term rate hike given the threshold for a further removal of accommodation has been lowered so dramatically," said Lindsey Piegza, chief economist at Stifel. "The Fed is not looking for strong or solid, 'moderate' is good enough."

The U.S. trade balance in goods deficit in April widened to $57.5 billion from $55.6 billion. Analysts had expected the deficit to widen further to $60.2 billion. Non-automotive consumer goods imports rose 0.8% month on month after a 9.9% decline in March.

"While the narrower-than-expected trade deficit spells stronger real GDP growth in [the second quarter], the underlying sluggishness in consumer goods imports warrants attention," Barclays' Jesse Hurwitz wrote in a note. "Some domestic retail sectors, particularly clothing and apparel stores, have reported rising inventory levels in recent months that could be responsible for the near-term slowdown in import demand."

AT&T (T) - Get Report is reportedly interested in buying Yahoo! (YHOO) , according to Bloomberg. Fellow telecom Verizon (VZ) - Get Report has also expressed interest in the Internet company as it spins off its core business. Yahoo!'s sales process is expected to end in the next few weeks. 

Alibaba (BABA) - Get Report tumbled on news of an investigation from the Securities and Exchange Commission. The SEC plans to investigate data reported from Singles Day, a massive online-sales holiday akin to Cyber Monday. The China-based e-commerce site said it didn't know when the investigation would conclude.

Hewlett Packard Enterprise (HPE) - Get Report surged 6% after announcing plans to spin off its enterprise services unit which will then merge with Computer Sciences (CSC) . HPE shareholders will hold 50% of the newly formed company. Computer Sciences rocketed 37% higher.

Microsoft (MSFT) - Get Report announced plans to lay off 1,850 workers, another step in its moves to streamline its cellphone hardware business acquired from Nokia. The tech giant will take a restructuring charge of roughly $950 million in the current quarter.

Tiffany & Co. (TIF) - Get Report fell after issuing a soft forecast for the full year. The jeweler expects full-year earnings to fall by mid-single-digit percentages, above consensus for a 1.8% drop. The company blamed lower foreign tourist spending in Europe, the U.S. and Asia.

Wells Fargo (WFC) - Get Report shares were on watch after the bank lowered profit targets for the next two years. The company is targeting return on equity between 11% to 14%, down from a previous range of 12% to 15%.

Wells Fargo is a holding in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells WFC?Learn more now.

Western Digital (WDC) - Get Report was upgraded to overweight at Barclays. The firm said the move was a valuation call based on a $60 price target.

Best Buy (BBY) - Get Report was downgraded to hold from buy with a $32 price target at Deutsche Bank. Analysts noted that the electronics retailer is investing more in future growth and a second-half recovery may not materialize.