The stock market has posted amazing gains since March, but when you look past the major indexes to see what's happening, you get a much different picture. There's been a tug of war between young tech companies and old-economy stocks, and for the most part, the upstarts have stolen the show in 2020. However, that wasn't the case on Tuesday, as the old-timers fought back. As of 12:18 p.m. EDT, the Dow Jones Industrial Average (DJINDICES:^DJI) was up 273 points to 26,954. The S&P 500 (SNPINDEX:^SPX) rose 13 points to 3,265, but the Nasdaq Composite (NASDAQINDEX:^COMP) was down 61 points to 10,707.

The energy sector played a key role in lifting the Dow today, as both of its oil company components posted significant gains. Yet many other players in the oil patch did even better. Below, we'll look more closely at what's happened in the energy markets and what impact it's having on stocks more broadly.

Several oil wells pumping, with a sunset sky behind.

Image source: Getty Images.

Why oil is getting more popular

The fortunes of many companies in the energy sector are closely connected to the price of oil. During the COVID-19 pandemic, oil prices have been extremely volatile, and they've remained depressed for a long time. The brief period in April when oil futures went negative showed the extent of short-term imbalances between supply and demand.

Since then, though, oil prices have bounced back dramatically. On Tuesday, West Texas Intermediate crude picked up more than 3%, rising above the $42-per-barrel level. That's still not high enough to make it easy for even the largest, most efficient energy companies to make money. However, it offers hope that a stronger economic recovery could send prices even higher, and then many companies that are struggling to survive could finally start to return to profitability.

In general, the more concerned investors have been about a particular company lately, the more its share price has risen Tuesday. Occidental Petroleum (NYSE:OXY) shares were up 13%, while SM Energy (NYSE:SM) jumped 14%. Further up the spectrum, Chevron (NYSE:CVX) picked up 6% to contribute to the Dow's gains, and BP (NYSE:BP) matched that 6% rise.

The good news also spread to related subsectors within energy. Oil-field services companies Halliburton (NYSE:HAL) and Schlumberger (NYSE:SLB) were up 10% and 7%, respectively. Refiners Valero Energy (NYSE:VLO) and Phillips 66 (NYSE:PSX) both rose 5%.

Are more mergers coming?

Also lifting spirits among energy investors was Monday's announcement that Chevron would purchase Noble Energy (NASDAQ:NBL) in a $13 billion merger. The all-stock deal will involve Noble Energy investors receiving Chevron stock worth about $5 billion, and Chevron will assume roughly $8 billion in Noble Energy debt.

Strategically, the acquisition will boost the combined company's asset base in key areas like the Permian Basin. It will also give Chevron greater exposure to areas like the Eagle Ford shale play and the DJ Basin, as well as international assets off the coast of Israel and west central Africa. Combining efforts should produce substantial cost savings -- something that's extremely important with oil prices remaining below historical averages.

Those following energy stocks hope that the Chevron deal will be just the beginning of a new phase of consolidation within the industry. Even with oil prices having climbed recently, there remains a lot of uncertainty about the future course of the broader economy and its potential impact on demand for energy products. Until the COVID-19 pandemic comes to a clearer resolution, it will still be smart for oil companies to look at ways to join forces and save money.