The S&P 500 shook off recent pressure to move higher on Tuesday as rising crude oil prices gave the energy sector a big boost.

The S&P 500 was up 0.68%, the Dow Jones Industrial Average added 0.18%, and the Nasdaq gained 1.2%. 

Crude oil prices rebounded on Tuesday after days of pressure. Prices have been lower as investors remained concerned over a global supply glut. The Organization of Petroleum Exporting Countries will meet in Vienna later this month, though expectations of a production freeze agreement are mixed.

West Texas Intermediate crude closed 5.8% higher at $45.81 a barrel on Tuesday, ending a three-session decline

"Clearly the market is now seeing increased chances of an OPEC production cut, after having previously become significantly more pessimistic," Commerzbank analysts wrote in a note. "What is more, Iran is allegedly willing to "freeze" its oil output at 4 million barrels per day, despite having reported an increase in supply of over 200,000 barrels to 3.9 million barrels per day in October. It is far from clear whether Saudi Arabia will go along with this." 

The energy sector was the best performer on Wall Street. Major oil producers including Exxon Mobil (XOM) , Chevron (CVX) , Royal Dutch Shell (RDS.A) and BP (BP) moved higher, while the Energy Select Sector SPDR ETF (XLE) rose 2.6%.

Retail sales climbed at a faster-than-expected pace in October as consumer appetite continued to drive the bulk of economic improvement. Retail sales last month rose by 0.8%, higher than 0.6% in September and a 0.6% growth rate analysts anticipated. Excluding gas and autos, sales increased 0.6%, double consensus estimates.

If you liked this article you might like

These Stocks Pay You to Own Them

Dow, S&P 500 Set New Records as Fed Moves to Unwind Balance Sheet

Stocks In Negative Territory as Chances for December Hike Surge

Energy Stocks Lead a Neutral Market Even After Oil Inventories Spike

Energy Takes a Backseat as Crude Oil Stabilizes Under $50