There's the prospect of less oil on the markets and that tipped the odds in commodity traders' favor on Tuesday. 

A rally in energy stocks put a fire under the entire market, pushing the major averages nearer to record highs.

Major oilers Chevron (CVX) and Exxon Mobil (XOM) shares boosted the Dow Jones Industrial Average, while Royal Dutch Shell (RDS.A) , BP (BP) , and Total (TOT) pushed the S&P 500 higher. 

Over Tuesday's session, the S&P 500 added 0.27%, the Dow rose 0.5%, and the Nasdaq gained 0.35%.

The day's gains, though modest, put benchmark indexes closer to the record highs achieved in May. Stocks had returned to record-breaking territory after October's rally helped to overturn a pullback in August and September. The S&P 500 is less than 1% from its record close, while the Dow hovers less than 400 points from its own.

Crude could continue to pull the energy sector higher, though likely just in the short term. 

"Price action suggests the path of least resistance is higher for now," Scott Shelton, oil broker and commodities specialist at ICAP, told CNBC

Tuesday's bounce was tied to an oil worker strike in Brazil, which slowed daily output by 25% in the world's ninth-largest oil-producing region. Separately, a port blockage in Libya would likely limit its production to less than 400,000 barrels a day. West Texas Intermediate crude closed 3.8% higher at $47.90 a barrel on Tuesday.

"There's still not a lot of conviction. Oil's not breaking out here," said Pavel Molchanov, energy analyst at Raymond James, according to CNBC. "There's some value buying on the dip going on right now. There is nothing stunning coming out of the energy sector all of a sudden today."

If you liked this article you might like

Tesla Headlines This Lineup of 12 Amazing New Cars for 2018

Fiat Chrysler Recalling Nearly 500,000 Ram Trucks Over Faulty Water Pump

Volkswagen Tiguan Named Top Compact SUV Under $35,000

Google's Waymo Teams With Intel on Self Driving Technology

Fiat Is the Only Real Automaker, Analyst Says