Investing in equities during a downturn can be challenging. Not every beaten-down stock is worth investing in, and investors must spend time separating the wheat from the chaff. But the benefits can be enormous for those who pick the right companies. A bull market will come eventually, and if history is any guide, it will last longer than the current downturn, giving investors plenty of time to recoup the money they have lost recently.

With that in mind, let's examine two stocks that have lagged the market this year but could be significant winners in the long run: HCA Healthcare (HCA 2.94%) and DexCom (DXCM 1.89%).

Chart showing HCA Healthcare's and DexCom's prices lower than the S&P 500 since mid-2022.

HCA data by YCharts

1. HCA Healthcare 

Here's the thing about healthcare stocks -- medical services are always in demand. And with the world's aging population, the need for medical services will only increase. HCA Healthcare is one of the largest hospital chains in the U.S., with dozens of facilities spread out across the country -- although the company has an especially strong presence in Florida and Texas.

Why has HCA been a loser in the market recently? First, it encountered pandemic-related issues. Occupancy levels in its facilities decreased during the worst of the outbreak, and physicians delivered fewer services to their patients -- two key ingredients for HCA Healthcare's top line. Second, the company's operating costs rose as a result of economic issues such as inflation and labor shortages.

These issues have affected dozens of companies, including some of HCA Healthcare's competitors. But these problems will subside eventually. The trouble would be if HCA Healthcare was losing ground compared to other players in this market. The opposite seems to be true. The company's market share has increased from 26.5% in 2019 (before the pandemic hit) to about 28% as of earlier this year.

In the second quarter, HCA Healthcare's revenue increased by about 2.7% year over year to $14.8 billion, not an unimpressive jump. The company's earnings per share (EPS) dropped by 10.6% year over year to $3.90. HCA Healthcare's results should improve as we move beyond the pandemic and it adjusts to the economic challenges we face.

The company is great at attracting increasingly more physicians and patients onto its network, notably by pouring money into more and better clinical equipment that allows doctors to serve their patients' needs better.

HCA Healthcare has made it a habit to grow its revenue, earnings, and market share in the past, and thanks to the growing healthcare sector, the company will almost certainly continue to do so. Investors only need to be patient and ride out the current storm with this healthcare giant. 

2. DexCom

DexCom is looking to serve the needs of another growing patient population: those with diabetes. According to estimates, about one American adult in three could be diabetic by 2050. Currently, 11.3% of the U.S. population is diabetic. One of the most critical tasks for diabetes patients is to keep track of their blood glucose levels. 

Blood glucose meters that use fingersticks come with severe limitations. First, they can be painful to use. Second, they can only read a patient's blood glucose level at one point in time. And, of course, they introduce the genuine possibility of human error. That's where DexCom comes in. The company offers alternative options known as continuous glucose monitoring (CGM) systems. 

CGM devices typically do away with (or at least substantially decrease) the need for fingersticks while continuously monitoring patients' blood glucose levels with up to 288 readings per day. In other words, CGM systems address the shortcomings of their main competition. DexCom currently makes most of its revenue from its G6 CGM device.

Revenue growth rates have dropped for the company, though. 

Chart showing DexCom's quarterly year-over-year revenue growth falling since early 2020.

DXCM Revenue (Quarterly YoY Growth) data by YCharts

That partly explains the medical device's recent struggles. DexCom's revenue jumped by 17% year over year in the second quarter to $696.2 million. The company's EPS decreased to $0.12 from $0.19. DexCom's inconsistent profit growth is probably another reason the market hasn't been kind to the company lately. 

Thankfully, there are bright spots for DexCom. The company has already launched its next-gen device, the G7, in various parts of Europe. It is awaiting clearance in the U.S. The G7 helped diabetes patients achieve even better outcomes than the G6 in clinical trials.

With the adoption of CGM systems on the rise, DexCom's next crown jewel should help it make even more headway. There is still plenty of potential demand within the current patient population, as the CGM market remains underpenetrated even in the U.S. And as already stated, this is a growing market, unfortunately.

As one of the leaders in CGM devices, all those factors signal a strong future for DexCom.