Stocks have been making a recovery since a challenging April, with particular strength seen in two sectors that tend to perform well during economic downturns.

Since April 16, when the S&P 500 hit its recent low, Utilities (XLU) have been leading the market rebound, surging nearly 12% and accounting for all of the sector's gains year to date. Consumer Staples (XLP) stocks have also seen a notable rise of almost 5% during the same period, outpacing the broader S&P 500's 2.7% increase.

Market analysts suggest that these sectors are likely playing catch-up after their lackluster performance earlier in 2024. Both Utilities and Consumer Staples had been among the worst performers in the S&P 500 over the past year. Truist co-chief investment officer Keith Lerner noted that investors may be rotating into these sectors, seeking areas that have not yet participated significantly in the recent market rally.

Lerner highlighted that the Utilities sector, in particular, was trading at its largest discount to the S&P 500 from a valuation standpoint since 2009. Similarly, Consumer Staples had underperformed the S&P 500 by nearly 30% over the last year, presenting a potential buying opportunity in these traditionally "defensive" sectors.

Investors' interest in Utilities has been supported by clear fundamental drivers, with earnings for the sector up by 26.7% this quarter compared to the same period last year, marking the second-highest growth rate among all sectors. Additionally, there's growing anticipation that increased interest in projects involving artificial intelligence and electric vehicles could boost electricity demand for companies within the Utilities sector.

Several macroeconomic factors have also contributed to the rise in Utilities. The sector, being sensitive to interest rates, has benefited from the Federal Reserve's recent message that another rate hike is unlikely, leading to a decline in the 10-year Treasury yield. This trend has provided relief for Utilities, as the sector typically struggles when bond yields rise.