After a rough 2022, the S&P 500 is up 7% year to date. There are, however, many stocks that haven't participated in this rally, and remain in a rut. Enphase Energy (ENPH -0.79%), 3M (MMM 0.36%), and Devon Energy (DVN 1.51%) are among those beaten-down names, but there are reasons to be optimistic that their rebounds are coming.

Coins stacked in front of a stock chart.

Image source: Getty Images.

Enphase Energy

Weak guidance, supply chain issues, and adverse regulatory impacts have combined to make Enphase one of the worst performers in the S&P 500 in 2023, with a year-to-date decline of about 40%.

Of particular concern is a recent change to California's "net metering" policy. Under the new rules, homeowners that produce excess electricity via solar panels will be reimbursed at below-market rates for their excess electricity. In turn, some analysts expect demand for rooftop solar -- and Enphase's microinverters, which convert solar power into AC power -- to decrease.

Yet, this slump might be an opportunity for long-term investors. Enphase isn't selling fairy dust and dreams -- it has a thriving business making the microinverters that convert the DC power generated by solar panels into AC power that can be used in homes or sent to the electrical grid. 

As the world increasingly turns to renewable energy sources, Enphase is well-positioned to capitalize. Its revenue has grown from $300 million to $2.6 billion over the last five years. What's more, Enphase is profitable, generating $492 million of net income ($3.62 a share) over the last 12 months.

To sum up, Enphase's stock has been beaten up, but the company remains a solid choice for long-term investors who want exposure to the growing solar industry.

MMM

Since their peak in 2017, shares of 3M are down 61%, and there are several good reasons why. Inflation, pension liabilities, and costly litigation are a few of them. In fact, 3M is fighting over 260,000 lawsuits that allege earplugs made by its Aearo Techologies subsidiary were defective. If those lawsuits are successful, 3M could be forced to pay billions of dollars in damages.

However, smart investors should be willing to look for the silver lining among the dark clouds. While the lawsuits could prove enormously costly, it will likely take years for the cases to work their way through the courts. In the meantime, 3M still will continue operating a valuable business. It has strong brand recognition, a wide range of products in various industries, and an excellent history of paying -- and raising -- its lucrative dividend.

MMM Price to Book Value Chart

MMM Price to Book Value data by YCharts.

Furthermore, 3M stock is dirt cheap. Its current price-to-book ratio of 3.6 is the lowest it has been in more than a decade. For long-term investors, that presents an opportunity that might be too good to pass up.

Devon Energy

Down 17% year to date, Devon Energy is another laggard worth a look. Rising costs have pushed shares of this oil and natural gas producer lower, but long-term investors have reasons to swoop in now. The company, an independent oil and gas producer, operates in the central United States with facilities in Texas, New Mexico, Oklahoma, Wyoming, and North Dakota.

Due to inflation, Devon's breakeven oil price has risen from around $30 a barrel to $40 a barrel. However, crude prices have remained above $70 a barrel for months, and forecasters including the International Energy Agency project that demand will rise in the back half of 2023 due to growing consumption in China. That could push oil prices higher, raising Devon's profits.

Shares look attractive at their current valuation. Devon's free cash flow yield (free cash flow divided by the company's market value) is 11%, more than twice its five-year average of 5%.

Owning volatile energy stocks isn't for everyone, but investors looking for exposure to the oil and natural gas sector should consider Devon.