We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

Published: Jun 17, 2022 5 min read

Money is not a client of any investment adviser featured on this page. The information provided on this page is for educational purposes only and is not intended as investment advice. Money does not offer advisory services.

Photocollage of a bear and some oil pumps backed by a stock market ticker background
Money; Getty Images

A months-long selloff finally culminated in stocks officially entering a bear market this week. But one area of the market is actually thriving.

The S&P 500, a benchmark commonly used to measure how stocks are doing overall, fell into a bear market on Monday, closing down around 22% from its high in early January. While nearly all 11 sectors of the S&P 500 — from industrials to health care to financials — have struggled this year, the energy sector is booming.

Energy stocks in the S&P 500 are up 39% in 2022, according to data from S&P Dow Jones Indices. Gas companies Exxon Mobil and Chevron are up 42% and 29% for the year, respectively. Marathon Oil's stock price has risen around 50%, and Occidental Petroleum is up 82%.

Meanwhile, consumer discretionary stocks, which include companies like eBay that sell nonessential goods and services, are down around 35% for the year. Communication services stock have fallen 32% and information technology stocks are down nearly 30%.

The energy sector only makes up about 5% of the overall S&P 500, the data from S&P Dow Jones Indices shows. That's small, especially when compared to a sector like IT, which accounts for nearly 27%. Still, if you have energy stocks in your portfolio — or if you don't but are considering them — here's what you need to know.

Why are energy stock prices rising?

Energy stocks tanked in 2020 during the onset of the pandemic as businesses were closed, people stopped traveling and the demand for oil plummeted. But now they're making a comeback.

We're heading back to the office and even traveling again, all of which entails using oil.

"We do have high demand for oil as economies continue to normalize and are recovering following the pandemic," says David Sekera, chief U.S. market strategist for Morningstar. "The market between oil supply and oil demand is very tight."

On top of that, the Russia-Ukraine war disrupted oil supply and caused a spike in gas prices, which you've likely experienced at the pump.

Should you buy energy stocks?

Financial advisors say that you should not making major changes to your investment portfolio based on short-term market fluctuations. Instead, they recommend that you have a diversified portfolio — including a mix of small-, mid- and large-cap stocks from both domestic and international companies in a variety of spaces — and regularly rebalance it.

There's no telling which sector of the market will pop or plunge in the near future. So if you're planning on pouring a ton of money into energy stocks right now, take a beat. It's possible that energy stock prices have even gotten too high.

"We think the markets are pricing in too high of oil prices for too long," Sekera says. "In the longer run, we still think oil prices will come down." And if that happens, stock prices for energy companies are likely to also fall.

Morningstar's analysis includes looking at the rig level — rigs that are used to drill new wells — which have been rising, Sekera says. We could start to see enough oil supply, or even oversupply, help bring oil prices down, he adds.

Because energy stock prices have run up so high, now may actually a good time to sell some of your energy stocks and take the profits, Sekera says.

While the energy sector "holds many more attractive stocks than other sectors," David Trainer, CEO of investment research firm New Constructs, said in an emailed report that his firm doesn't recommend buying energy stocks without doing your homework. Investors should focus on the most profitable companies that are trading with the biggest discounts.

Trainer says his firm is particularly bullish on certain energy stocks — meaning it expects prices to keep rising — including Petrobras, Shell and Phillips 66.

More from Money:

3 Smart Investing Moves to Make in a Bear Market

How to Save Money on Gas

7 Best Online Stock Trading Platforms of 2022