What happened

Shares of shale exploration and production company Devon Energy (DVN 0.38%), natural gas exporter Tellurian (TELL -4.36%), and deepwater-drilling equipment vendor Borr Drilling (BORR -2.15%) were all up strongly on Monday, rising 8.2%, 8.1%, and 10.5%, respectively, as of 3:47 p.m. ET.

Although each of these companies operates in a different corner of the broader energy sector, the entire sector got a lift today. Over the past two weeks, energy-related stocks have sold off hard, as aggressive Federal Reserve rate hikes have prompted fears of a recession.

However, after such a big sell-off, investors got some better-than-expected economic data from the U.S., which seemed to assuage fears that the Fed is hiking rates into a slowdown. Having already sold off so much, energy companies rose across the board.

Additionally, Borr reached a deal to sell three of its jack-up rigs today, which will help its liquidity as the company prepares to pay down some of its debt load.

So what

On Monday, U.S. durable-goods order data for May showed an increase of 0.7%, well above the expected 0.2%. Pending home sales also rose 0.7%. These new data seemed to indicate the U.S. economy is still growing positively, albeit at a slower pace. In response, oil rose about 2% into the $109 to $110 per barrel range, bouncing off the lows hit last week after a two-week slide.

Oil stocks had been demolished in the past two weeks, as the market abruptly went from fearing shortages to fearing oversupply brought on by recession worries. The Federal Reserve hiked the federal funds rate by 75 basis points on June 15, the largest single increase since 1994.

Meanwhile, a University of Michigan consumer survey released earlier this month, which showed inflation expectations over the next five years starting to rise, was revised downward. More-aggressive rate hikes into a slowing economy could lead to recession, but today's data showed a more-mixed picture, with remaining pockets of strength.

Oil and commodities tend to be proxies for economic activity expectations, so today marked a reprieve for the sector. Robust economic activity, along with lower inflation expectations, would be especially good for Tellurian. While Tellurian owns some natural gas drilling assets, its main asset is its Driftwood LNG project, which has only begun construction and won't come on line until 2026.

So Tellurian's shareholders are likely praying for the solid natural gas demand that comes with a strong economy, but with lower interest rates, since its cost of capital is important. Lower inflation expectations are good, but lower gas prices are not. Since we got lower inflation expectations last week but still evidence of solid economic activity today, Tellurian rose strongly after selling off hard last week.

Meanwhile, Borr is taking this opportunity to sell three of its jack-up rigs. Today, the company entered into an agreement to sell three rigs under construction for a total of $320 million. Its financial results are rapidly improving, but this is after years of reporting net losses amid lower oil prices and drilling activity. That in turn caused Borr to take on lots of debt, and there are some $500 million in upcoming maturities in 2023. Given the increase in interest rates, this sale will help the company pay down those obligations without having to refinance at higher rates.

Now what

The energy market, and really all commodity markets, have been on a wild roller coaster this year, as supply constraints have caused big price increases, which are now giving way to concerns over a recession. While commodities typically don't do well in a downturn, supply growth has also been very constrained, with below-normal levels of exploration and production investment, for the better part of a decade. Meanwhile, the Russia-Ukraine war continues to foster uncertainty over supply.

As I've said before, the energy sector is very cheap if oil and natural gas prices stay near these elevated levels, but it's also subject to huge positive and negative swings. One sound strategy would be to keep a fixed percentage of your portfolio in the energy sector, either in your favorite names, or in exchange-traded funds, and then rebalance periodically, adding after big downturns and selling after big increases. That process-oriented approach is probably the best to take with a sector that fluctuates a lot.