Utilities are normally one of the most boring areas of the stock market. This year, though, they’ve been anything but. The Utilities Select Sector SPDR Fund is up more than 4% in 2022 and notched a record high on Monday. The move to an all-time high was led by several names in the sector reaching record or 52-week highs, including Sempra Energy , Xcel Energy and Consolidated Edison . Some of those gains were given back this week following another hot inflation report and other mixed economic data, with the sector losing 3.5%. Still, it outpaced the broader market, which was down more than 5% week to date. Utilities are also outperforming the S & P 500 in 2022, which is down 19%. Utilities were also a relative outperformer Friday, with the XLU falling just 0.4% while the S & P 500 dropped more than 1%. The moves in the utility sector come ahead of another rate hike from the Federal Reserve this month and as fears mount that the central bank will struggle to tame surging prices without steering the economy into recession. Here’s a breakdown of what’s driving utilities this year, and how analysts think investors can capitalize on the trend. Why utilities? Generally speaking, investors view utility stocks as defensive plays. These names typically offer stable returns and steady above-average dividends investors can rely on even during a downturn. Utilities is also one of the only sectors this year that has not revised down earnings despite the market shake-up, which is likely another draw for investors, said Mizuho’s Anthony Crowdell. The utility stocks hitting new highs are also likely benefiting from increased investor interest in the sector amid the passage of the Inflation Reduction Act which extends tax benefits for the development of renewable energy, said Jay Rhame, CEO of Reaves Asset Management. Rhame said investors have increasing confidence that many utility companies can steadily grow their earnings and dividends in coming years, which contrasts with the uncertainty about earnings in many other sectors that are more vulnerable to slowing economic growth. Guggenheim’s Shahriar Pourreza notes that utility companies have historically been highly sensitive to rising rates, but that narrative is changing as the sector boasts strong earnings and investors come to view it as a hedge against inflation. “On the surface, utilities haven’t acted like utilities,” Pourreza said. “Interest rates have moved higher, but utilities continue to outperform and some of that is because they’re being seen as less of an interest rate call, they’re being seen as less of a bond surrogate call, they’re being seen much more from a structural thematic call and that is really bent on the growth of renewables and [Environmental, Social and Governance] investing.” Tax credits from the Inflation Reduction Act, ongoing infrastructure projects and the search for energy security given this year’s geopolitical crisis in Ukraine have provided tail winds to the sector and should continue to do so going forward, Pourreza added. How to play it Wall Street analysts have some thoughts on where investors should park their money as utilities outperform. UBS analyst Ross Fowler said in a June note that despite the stock’s massive 2022 run-up, Sempra Energy is undervalued and should benefit from a push toward clean energy. Roughly 65% of Wall Street analysts rate the stock with a buy or overweight rating, according to FactSet. Across the board, Morgan Stanley said utilities are reasonably priced and should continue to hold that value even if a recession hits. In a note to clients earlier this month, analyst David Arcaro highlighted American Electric Power and Exelon among the low-risk names best positioned for a downturn. “Valuations have expanded but we don’t see a clear case that the group is overpriced yet — valuations relative to the S & P 500, historical levels, and bonds are all below prior peaks over the last 10 years, so absent an economic uptick, we think the space is still reasonably valued for its defensive characteristics,” he wrote. This week, Arcaro called Constellation Energy one of the biggest beneficiaries of emerging clean hydrogen production in the wake of the Inflation Reduction Act and its added tax credits. Goldman Sachs’ Brian Singer spotlighted CMS Energy , AES Corp , Portland General Electric and Sempra as some of the beneficiaries of the bill in a recent note to clients. Some of those names — specifically Constellation — should benefit particularly from the nuclear production tax credits. “We maintain our view that the premium utilities, i.e. those with strong reliability metrics and regulatory relationships, are best positioned to weather inflation,” wrote Bank of America’s Julien Dumoulin-Smith in a recent note to clients, highlighting names like Atmos Energy and Southwest Gas . Both stocks have an overweight or buy rating from more than 50% of analysts and could rally roughly 12% each from Thursday’s close based on the consensus price target. — CNBC’s Pippa Stevens contributed reporting