U.S. stocks made a surprise recovery by late afternoon Tuesday as crude oil prices returned to a level above $30 a barrel after dipping below for the first time since December 2003. 

The S&P 500 inched 0.1% higher, the Dow Jones Industrial Average added 0.18%, and the Nasdaq was up 0.26%.

Trading has been rocky throughout the day with an earlier rally deflating by midday. Since the beginning of the year, the S&P 500 and Dow have fallen 5.9%, and the Nasdaq has dropped 7.4%. U.S. markets were under extreme pressure last week after the Shanghai Composite suffered a weekly loss of more than 10%. The People's Bank of China continued to devalue the yuan in an attempt to stabilize a weakening manufacturing sector.

Crude oil prices moved off of session lows by the end of its session. West Texas Intermediate crude fell 3.1% to $30.43 a barrel on Tuesday afternoon after briefly breaking below $30. The commodity has fallen sharply to begin the year as worries over oversupply persist.

Energy shares were the worst performers on markets Tuesday. Major oilers including Exxon Mobil (XOM) , Chevron (CVX) , ConocoPhillips (COP) , Royal Dutch Shell (RDS.A)  and Total (TOT) were all lower, while the Energy Select Sector SPDR ETF (XLE) fell 1.6%. 

BP (BP) plans to cut around 4,000 jobs at its exploration and production businesses over the next year as it faces an extended period of lower oil prices. Layoffs will be focused on operations in Angola, Azerbaijan and the U.S.

Job openings in the U.S. rose in November, while more people were hired and more voluntarily quit, all positive signs for the strength of the labor market. Job openings rose to 5.43 million, while hires rose to 5.2 million, according to the recent Job Openings and Labor Turnover Survey.

Alcoa (AA) unofficially kicked off earnings season after the bell Monday with better-than-expected earnings on lowered estimates. Profit fell 88%, while revenue slid 18%, though investors had expected much worse as the aluminum company faces slumping commodity prices. On the bright side, aerospace sales continued to show strength. The company expects sales to increase 8% to 9% this year on demand for commercial aircraft and jet engines.

Starbucks (SBUX) is backing a big push into China with plans to open 500 stores in the region every year until 2021. The coffee chain already operates 2,000 stores across 100 Chinese cities. CEO Howard Schultz expects China to become Starbucks' largest market in the future.

Jim Cramer of Action Alerts PLUS, which owns Starbucks in its portfolio, said, "The Chinese build out shows a commitment that indicates sales are very strong. That's why Schultz flew there this weekend and why he is making such a big deal of sales there. It's a big win for them."

Exclusive Look Inside:

You see Jim Cramer on TV. Now, see where he invests his money and why Starbucks is a core holding of his multi-million dollar portfolio.

Want to be alerted before Jim Cramer buys or sells SBUX? Learn more now.

Lululemon (LULU) jumped 8% after raising its guidance for the fourth quarter on strong holiday sales. The fitness apparel brand expects fourth-quarter revenue of at least $690 million, up from its previous range no higher than $685 million.

McDonald's (MCD) shares were on watch as reports broke the company could face more pressure from the European Union. The world's largest hamburger chain has been hit with several complaints in Italy that it charges franchisees rents well over market rates. The company is already under investigation for its tax deal with Luxembourg.

Darden Restaurants (DRI) moved slightly higher even after activist investor Starboard Value cut its stake in the restaurant manager to 8.1% from 9.1%. The firm said it had reduced its stake given recent stock price appreciation.

DreamWorks (DWA) added 4.7% after FBR Capital Markets upgraded to 'outperform' from 'market perform' and added shares to its Top Picks list. Analysts said the firm should see higher payments from Netflix (NFLX) .

GameStop  (GME) slumped after issuing weak guidance for its holiday-shopping months. The video game retailer said sales over the season rose just 1.8% as a stronger dollar hit overseas revenue. Software sales dropped due to fewer Nintendo titles this year compared to the last.

If you liked this article you might like

Profit With Technical Analysis: Cramer's 'Mad Money' Recap (Tuesday 2/20/18)

Profit With Technical Analysis: Cramer's 'Mad Money' Recap (Tuesday 2/20/18)

Cramer: Hunting for Bargains

Cramer: Hunting for Bargains

Tuesday Looked a Bit Like a Waterloo Moment for Bulls: Market Recon

Tuesday Looked a Bit Like a Waterloo Moment for Bulls: Market Recon

How to Play the Banks as They Get Set to Report Earnings

How to Play the Banks as They Get Set to Report Earnings

Your February Paycheck Could See a Little Bump, Thanks to the New Tax Bill

Your February Paycheck Could See a Little Bump, Thanks to the New Tax Bill