NEW YORK - A recent rally that has boosted nearly every corner of the U.S. stock market has left energy shares behind, and bullish investors are betting upcoming earnings reports and rising geopolitical tensions could spark a rebound for the struggling group.

The energy sector has slumped nearly 3% since late October, a period during which the S&P 500 has surged 16%. The benchmark index rose 24% for all of 2023, while energy fell 4.8%, the second-largest drop last year among S&P 500 sectors.

The sector's struggles have continued even as other economically sensitive groups such as banks and small-cap stocks have benefited from investors' growing belief that the economy will be able to navigate a "soft landing" where growth remains stable while inflation subsides.

One key reason for the sector's underperformance has been a sharp downturn in oil prices. U.S. crude is down over 20% since late September, to around $73 a barrel, pressured by strong supplies, particularly in the U.S., and concerns about tepid demand in China and Europe, investors said.

"Right now, oil prices have been ... leading the stocks," said Matthew Maley, chief market strategist at Miller Tabak. "So if oil prices can break out a little bit from here, which would catch people a little off guard, this energy group is going to start playing catch up real quick."

Strategists at the Wells Fargo Investment Institute (WFII) this week upgraded their rating on the energy sector to "favorable" from "neutral," saying "oil prices will bottom with the global economy and then finish the year higher."

A potential rise in Middle East tensions and any OPEC actions on production are factors that could influence near-term oil prices.

Prices for U.S. crude jumped as much as 4.5% on Friday before settling up 0.9%, after several oil tankers diverted course from the Red Sea following overnight air and sea strikes by the United States and Britain on Houthi targets in Yemen. The energy sector ended up 1.3% on the day.

"While a resolution of the problems in the Red Sea would be bearish for oil, it appears as though the situation is escalating and the risk should drive oil prices higher," wrote Mike O'Rourke, chief market strategist at JonesTrading.

Another key factor for the group will be upcoming quarterly earnings reports. Oil services firm SLB, formerly called Schlumberger, reports next week, with Baker Hughes and Marathon Petroleum among those expected later in the month.

Energy is expected to post the worst full-year 2023 earnings performance of any sector, falling nearly 26% overall, LSEG data showed. But its earnings are expected to increase 1.6% in 2024.

Ahead of results, WFII strategists this week also pointed to "historically cheap" valuations for energy shares, noting that the sector trades at around 10 times trailing earnings versus a trailing P/E ratio of 22 times for the overall S&P 500.

Improving earnings trends and enticing valuations are among the factors supporting energy shares along with the potential for the group to be a hedge should geopolitical tensions rise, said Walter Todd, chief investment officer at Greenwood Capital. The firm is overweight energy in its portfolios, including shares of Conocophillips and Chevron.

While energy earnings are improving, the sector's estimated performance this year is still expected to trail the 11.1% increase for the overall S&P 500 in 2024.

Robert Pavlik, senior portfolio manager at Dakota Wealth Management, said he thinks oil is fairly priced, pointing to expected slowing of the U.S. economy and doubts the Middle East conflict would give the commodity a lasting boost. Pavlik said he has "slightly less than market exposure" to energy shares, preferring other sectors such as industrials and technology.

"I think there are other areas of the market that will benefit most likely more than energy," Pavlik said.

(Reporting by Lewis Krauskopf; Editing by Ira Iosebashvili and Richard Chang)