What happened Shares of onshore U.S. exploration and production company Centennial Resource Development (NASDAQ: CDEV) rose as much as 7% on April 1. But that was a relatively small gain compared to Diamondback Energy (NASDAQ: FANG), which jumped as much as 10%. Even better were Marathon Petroleum (NYSE: MRO) and SM Energy (NYSE: SM), which saw highs of around 12% and 15%, respectively. Image source: Getty Images. Although all four of these names had pulled back from their peaks as the trading day drew to a close, they were still holding on to most of their gains. There's a somewhat complex web here backing these price moves even though they all boil down to just one main thing. So what Since these are all energy companies, the core of the story is basically oil and natural gas prices, which drive the top and bottom lines at Centennial Resource Development, Diamondback Energy, Marathon Petroleum, and SM Energy. Oil and natural gas were both moving higher today. Energy supply and demand has been working back into a balance since the economic shutdowns caused by the coronavirus. Oil prices have rebounded as demand has recovered, but the world still isn't at a healthy equilibrium. OPEC has been curtailing its production to limit supply, and many drillers, including giants like Chevron and ExxonMobil, have also pulled back. With oil prices higher and vaccines starting to roll out around the world, however, some mid-size and smaller exploration and production companies have been starting to increase drilling activity. Investors seem hopeful that this will translate into better results as their volumes increase. CDEV data by YCharts Meanwhile, OPEC just announced that it was going to slowly increase its production, too. Basically, over the next few months it will bring back around a quarter of the production it has been curtailing. While at first that would seem a negative, OPEC's move suggests the group believes demand can support the increases it plans. But it also shows that OPEC is taking a measured approach so that it doesn't flood the market. Meanwhile, by increasing output, OPEC may also keep rising oil prices in check, which could actually be supportive of demand as it would limit inflation. So OPEC's decision today is likely to be a net positive, and, thus, investors bid up oil and the companies that drill for it. Now what One day does not make a trend in the energy sector, which tends to be a volatile sector in normal times. The last year has not been normal times, however, and the energy sector has been extra volatile. Long-term investors should probably avoid trying to time the ups and downs here. It's exciting to see stocks like Centennial Resource Development, Diamondback Energy, Marathon Petroleum, and SM Energy increase sharply in value along with oil prices. The problem is that today's rise could turn into a decline tomorrow if investors interpret the ongoing news flow negatively. Most investors would probably be better off sticking to the largest and strongest names in the space if they want exposure to energy right now, with companies like Chevron and Exxon sitting atop the list of contenders. 10 stocks we like better than Diamondback EnergyWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Diamondback Energy wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of February 24, 2021 Reuben Gregg Brewer has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.Source