What happened

In a brutal year for stocks outside the oil and gas patch, Phillips 66 (PSX -2.51%) proved the value of diversification in 2022, with its shares gaining 44% over the year. Add in the company's generous -- and secure -- dividend, and shareholders enjoyed 49.6% in total returns.

Those results were the product of relatively strong recovery in demand for oil, natural gas, the chemicals made from them, and all the challenges with supply that affected global markets and commodity prices. 

So what

Phillips 66 is a major refiner, operator of pipelines and storage, petrochemicals manufacturer, and seller of refined products to customers and resellers. It has really benefited from the recovery in demand, as well as inflationary impacts. It does not operate any exploration and production, so while other peers have benefited more from higher oil prices, Phillips 66 has been more a story of recovery of demand, and the strong returns it has a long history of generating. Over the past four quarters, the $5.8 billion in free cash flow it generated is the most in its history as a stand-alone company.

Now what

What happens next? It depends, of course, on a few factors. The oil and gas industry is notoriously cyclical, with boom and bust cycles that have destroyed billions of dollars of investor capital over the years. And while we could see the cycle turn ugly if we do indeed fall into a recession, with steep job losses paired with weak economic output, Phillips 66 remains in very solid shape for investors willing to buy and hold through the cycle, over multiple years.

As a starting point, it is one of the most stable oil and gas companies you can own, with steady demand across the cycle helping protect it from big losses during down cycles. Since it doesn't produce oil or gas, it's more resistant to losses from low prices; it makes most of its money on fixed fees for logistics services, and on the margins it can earn as a refiner and petrochemical maker, where its selling prices are often tied to the benchmarks that set the price it pays for feedstocks. 

Lastly, even with the huge run-up in its stock, Phillips 66 is still reasonably priced. While other oil stocks have set new highs, its shares still trade almost 17% below their pre-pandemic highs. And the 3.7% yield investors earn at recent prices is the highest you'd have ever earned on shares anytime before the coronavirus pandemic. Investors looking for dividends in the energy patch should consider Phillips 66. 

While there are no guarantees in the short term, I expect Phillips 66 stock is very likely to remain a moneymaker for investors who buy and hold over the long term, no matter what happens with the energy cycle in the short term.