NEW YORK - Contrarian investors were rewarded for betting on the beaten down U.S. energy sector earlier this year with a blazing rally. Some believe a tight oil market and resilient U.S. growth will keep energy stocks rising for the rest of 2023.

The largest U.S. energy exchange traded fund, the Energy Select Sector SPDR Fund, is up nearly 15% over the last three months and stands near its highest level in nine years.

The move follows a rally in oil that has taken the price ofU.S. West Texas Intermediate crude (WTI) up more than 30% since June on supply concerns from extended production cuts by Saudi Arabia and Russia, as well as unexpected strength in the U.S. economy.

Bullish investors argue that energy stocks are still cheap by historical standards - and far less richly valued than other areas of the market. The energy sector currently trades at a forward price to earnings ratio of 12.2, well below its historical median forward P/E of 15.3, according to LSEG Datastream. The S&P 500 trades at a forward P/E of 20.

"Valuations can go up even if the oil price stays static because on a cash flow basis these stocks are very reasonably priced," said Charles Lemonides, head of hedge fund ValueWorks LLC, who is overweight the sector.

Energy stocks surged last year as inflation jumped to 40-year highs but landed with a thud at the start of 2023, when expectations of a U.S. recession and oversupply encouraged investors to take profits.

Both forecasts failed to materialize: economic growth in the U.S. proved far more resilient than many had predicted, despite the Federal Reserve’s most aggressive monetary policy tightening in decades.

Meanwhile, drillers have been taking rigs offline, contributing to what is widely seen as a tight market, while Russia and Saudi Arabia have curtailed production.

The U.S. rig count is about 16% below where it was this time last year, according to data from U.S. energy services firm Baker Hughes. Overall, U.S. oil output from top shale-producing regions is on track to fall for a third month in a row in October to the lowest level since May, the U.S. Energy Information Administration said.

Despite recent gains, the S&P 500 energy sector is up only 4.2% year-to-date, compared with a 38% rise in technology stocks and a nearly 45% rise in communication. The broader S&P 500 index is up about 16%.

"Energy companies have newfound supply discipline" that will keep oil supply constrained, wrote Savita Subramanian, equity and quant strategist at BofA Global Investors, who has an overweight on the sector.

Citi on Monday became one the latest banks to predict that global benchmark Brent crude could exceed $100 a barrel this year.

While higher oil prices tend to eventually weigh on demand, that is unlikely to happen until Brent rises to between $110 and $120, said Bjarne Schieldrop, chief commodity analyst at SEB Research.

At the same time, continued production caps by Russia and Saudi Arabia will keep a floor under oil prices for the time being, he said.

Parts of the market appear skeptical energy stocks have much further to run.

Bearish investors point to the sector’s earnings, where growth rates are expected to decline by 37% in the third quarter, followed by double-digit declines in both the fourth quarter and the first quarter of 2024, according to LSEG estimates.

Energy demand could suffer if a rebound in the economy of top commodity consumer China fails to materialize. A 2024 recession in the U.S. - which many strategists still view as a possibility despite growing hopes of a soft landing, could also weigh on oil prices.

Persistently high oil prices could also lead to worries over a rebound in U.S. inflation, bolstering the case for the Fed to cool economic growth by keeping rates higher for longer.

“A supply driven increase in oil prices brings the prospect of both a renewal in inflation … and a slowdown in real consumer expenditures,” analysts at Macquarie wrote.

Still, Rodney Clayton, a portfolio manager at Duff & Phelps Investment Management, believes the energy sector's large dividends will attract income-seeking investors - especially if the economy falters and bond yields fall.

"Companies are building up the trust of investors and are very reluctant to cut those dividends," he said. "That should result in a ... smoother ride for energy stocks than we’ve been accustomed to."

(Reporting by David Randall; Editing by Ira Iosebashvili and Marguerita Choy)