A big challenge for investors right now is finding stocks that could potentially weather the storm during a recession. If that happens, share prices may only end up going lower in the months ahead, giving investors little reason to buy stocks today.

However, there are some investments that may not follow that pattern and their resiliency could make them good investments to hang on to, even during a downturn. One stock which fits those criteria is HCA Healthcare (HCA 2.73%), which runs 182 hospitals and has 2,200 ambulatory sites of care in the U.S. and U.K.

The hospital operator's stock has plummeted 19% this year, which is only slightly worse than the S&P 500's decline of 18%. While the temptation may be to wait out another dip, here's why investors may be better off buying the healthcare stock right now. 

Recent legislation should help HCA

Last month, the government passed the Inflation Reduction Act, which will be a big help for low-income individuals paying for health insurance. The bill extends Enhanced Affordable Care Act subsidies (which were included in the 2021 American Rescue Plan Act) for approximately 13 million people until 2025. Without that bill, some people may have seen their premiums rise by over 50%.

Those subsidies won't just help the public, they will also help add some stability for HCA because it won't see a big drop off in patients who are able to afford its care. Now that the COVID-19 public health emergency may be nearing an end, people could lose access to Medicaid, and the enhanced subsidies will minimize that impact.

HCA's business looks a bit safer as a result of the bill's passage as it could also help bolster revenue should a recession take place, leading to greater unemployment.

Earnings could get a whole lot stronger

President Joe Biden recently stated that the pandemic is over in the U.S. Regardless of whether it is technically over or not, that's not the point for HCA. As long as the company's hospitals are no longer overrun with COVID cases and it doesn't need to take on expensive, temporary staff, the business should be in much better shape moving forward. Its operating margins should be better, and that will lead to a stronger bottom line.

Even if a recession takes place, the big risk for hospitals would be people losing their jobs and losing coverage for health insurance. But with the enhanced subsidies still around, that alleviates one of the company's largest risks. And at the same time, without an excessive need for nurses, the rest of the company's financials should also be in better shape. 

Better profit numbers should also make the stock a much better buy than it is right now. In the trailing 12 months, the company generated $6.5 billion in profit on revenue of $60.1 billion, for a profit margin of around 11%.

HCA's stock is already cheap

One more reason to buy HCA's stock today is that it's trading at less than 11 times its future profits, which is cheaper than the nearly 16 times forward earnings that healthcare stocks average. 

HCA's hospitals provide necessary and vital services to millions of people across the country, and so the business should make for a stable investment. And now, with a brighter, safer future ahead, HCA could make for an even better all-around buy for long-term investors