The S&P 500 index is down roughly 18% this year, as of this writing. Yet energy sector stocks, which have been underperforming for a long time, have risen significantly on the back of stronger oil prices.

Three top stocks that have risen dramatically this year include Occidental Petroleum (OXY -0.73%), PBF Energy (PBF -0.79%), and Helmerich & Payne (HP 1.88%). Let's discuss what's driving these stocks higher and if their rally will be sustained in the coming years.

Occidental Petroleum

After years of woes, things turned for the better for Occidental Petroleum this year. The oil and gas producer got hit severely as commodity prices collapsed soon after its merger with Anadarko in 2019. The merger wasn't done at the most favorable terms to begin with.

But the steep rise in oil prices this year, driven both by a demand-supply mismatch as well as heightened uncertainty due to the Russia-Ukraine war, has provided much-needed relief to Occidental Petroleum.

OXY Chart

OXY data by YCharts

The stock is up 118% so far this year. This month, Berkshire Hathaway added 5.9 million shares to its position in Occidental Petroleum. Warren Buffett has been buying Occidental shares steadily this year, partially contributing to the stock's steep rise. Berkshire now holds a 15.2% stake in Occidental. Including the warrants that it received for funding the Anadarko deal, Berkshire's stake in Occidental rises to around 24%. Occidental reported solid first-quarter results, backed by strong oil prices. It repaid $3.3 billion, or 12% of its outstanding debt, during the quarter.  

Although Occidental Petroleum's stock has risen significantly, it is still well below its highs in 2018. If oil prices remain supportive, the stock may continue to rise higher. Though the company's performance is tied to volatile oil prices, after years of low oil prices, most producers have become much leaner and can operate profitably at much lower oil prices. 

Two oil workers using a laptop in front of an oil rig.

Image source: Getty Images.

PBF Energy

Stock of refiner PBF Energy is up 137% year to date, as of this writing. Demand for refined products is rebounding to pre-COVID levels. Returning demand, coupled with reduced global refining capacity, is driving refined products prices higher. Tom Nimbley, PBF Energy's CEO, said during the company's earnings call, "Global refining capacity is more than four million barrels lower today than in 2019."

While the broader outlook for refiners looks positive, investors should bear in mind two key risks relating to PBF Energy. The first one relates to the refiner's compliance costs for the Renewable Fuel Standard. Any change in the blending requirements may adversely affect PBF Energy. Notably, the refiner is developing its own renewable fuels production facility, with an aimed start of production in the first half of 2023.

Another key concern is the company's high debt levels. Even though it has repaid $390 million of debt in 15 months, its debt level remains elevated. The refiner's debt-to-capital and debt-to-EBITDA ratios are higher than that for Valero Energy or Phillips 66.   

PBF Debt To Capital (Quarterly) Chart

PBF Debt To Capital (Quarterly) data by YCharts

Strong demand and prices for oil and gas are expected to support PBF Energy's earnings over the next several quarters. That will help the refiner repay some if its debt and potentially reinstate its dividend, which it suspended in March 2020. It is this positive outlook that's driving the stock higher lately.

Helmerich & Payne

Helmerich & Payne provides services to oil and gas producers, and clearly its performance is tied to oil and gas prices. With increasing oil demand, drilling activity is expected to rise, helping companies like it.

Though Helmerich & Payne incurred loss in the first quarter, improved oil demand and prices should further support its performance in the coming quarters. The company boasts a stronger balance sheet than its peers Patterson-UTI Energy, Nabors Industries, and Precision Drilling.

HP Net Total Long Term Debt (Quarterly) Chart

HP Net Total Long Term Debt (Quarterly) data by YCharts

Although Helmerich & Payne looks better compared with its peers, it is important to note that its business is tied to oil and gas production and prices. Helmerich & Payne has a long history of dividend growth before the brutal market conditions forced it to cut dividend in 2020. With a dividend yield of slightly above 2%, dividend investors will find the stock attractive.