Stocks that historically underperform the average returns of the S&P 500 tend to keep coming up short. Therefore, investors must always remain cautious when buying struggling stocks. Betting on turnarounds often results in losses.

For struggling stocks to succeed, I believe that companies need some things. First, I'd like to see at least some semblance of a competitive advantage. I also want expectations from the market to simply be way too pessimistic. And I want a reasonable explanation for why better days could be ahead.

When asking my followers on social media, PayPal Holdings (PYPL 2.90%) came out as the runaway winner for struggling stocks to buy at a discount, and I agree that it has potential. But before we get to PayPal, I want to explain why other ideas like Dollar General (DG -0.41%), Sea Limited (SE 0.05%), Driven Brands (DRVN -0.28%), and Advance Auto Parts (AAP 0.58%) all make the cut as well. 

1. Dollar General

Discount retailer Dollar General has a competitive advantage: over 19,000 locations around the country. Some consumers will still shop at other discount retailers or big-box stores. But the convenience of always having a Dollar General nearby allows it to consistently capture at least a portion of consumer spending even in bad times.

As my Motley Fool colleague James Brumley points out, it's possible that Dollar General got a little sloppy in recent years as it focused on opening lots of new stores. That's why this year, it's focusing on fixing inventory problems, staffing, and more.

These moves will be costly in the near term with management projecting up to a 34% year-over-year drop in earnings per share (EPS) this year.

With profits dropping this much, it's no wonder that Dollar General stock has dropped to four-year lows. That said, investors should zoom out: The company's trailing-12-month revenue is still at an all-time high. Its profit margin in the first half of its fiscal 2023 was 7%, which is respectable. And it's addressing the problems that could help results bounce back sooner rather than later.

Trading at a price-to-earnings (P/E) valuation of less than 13, Dollar General stock has never been cheaper. Therefore, I believe today's price is a safe place to buy into a company that consistently grew EPS at a double-digit pace over the past decade.

DG PE Ratio Chart

DG PE ratio data by YCharts.

2. Sea Limited

Sea Limited is a company from Singapore that specializes in e-commerce, video games, and fintech. The company doesn't necessarily have a definitive edge in any of these areas; these spaces are competitive. However, Sea does have one important advantage: The business is self-funding.

When interest rates were near zero, many fast-growing companies operated at losses to scale up quickly. And they paid for this growth with debt, promising to become profitable someday when necessary.

Well, interest rates shot higher, and it indeed became necessary. But few companies actually made the switch to profitability. Perhaps the most notable exception was Sea, which went from steep losses to net profits in a single quarter.

SE EPS Diluted (Quarterly) Chart

SE EPS diluted (quarterly) data by YCharts.

Now that Sea's business is fully funding operations, shareholders don't have to worry about incremental financing to pay the bills, which could otherwise dilute shareholder value. Moreover, the company is still growing at a respectable rate even while paying for it from its own checkbook. 

In the second quarter, revenue for Sea's e-commerce segment was up 28% year over year, and revenue for its fintech arm was up a whopping 53%. The lone laggard was its video game business.

But shareholders just got good news on that front: Previously, India had banned its most popular video game, but now the ban is lifted, giving hope that Sea's video game unit can return to growth as well.

Growing and profitable, Sea looks like it's in good position to bounce back.

3. Driven Brands

Driven Brands is on a mission to roll up various car maintenance brands into a single company to gain efficiencies of scale and national brand recognition. This can lead to competitive advantages. It's a growth-by-acquisition model peppered with growth by organic expansion for good measure.

Driven Brands' strategy is fairly capital intensive. Therefore, there's risk with this idea. But I believe the pessimism regarding its present struggles is overblown and that the stock is cheap enough to make a calculated-risk investment today.

A child looks through the windshield of a car inside a car wash.

Image source: Getty Images.

Investors are pessimistic with Driven Brands stock because of its car wash segment. In the second quarter, same-store sales for that business fell 4% year over year, and management noted how competition is heating up. Consider that this business segment is its most profitable, with a second-quarter margin of 26.5% for adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA).

Competition in the car-wash space motivated management to lower its full-year 2023 revenue guidance by a paltry 2%. Consequently, the stock got cut nearly in half. I think everyone can agree that this might be a slight overreaction from the market.

For the year, Driven Brands still expects $535 million in adjusted EBITDA. For perspective, its enterprise value is just $6.2 billion, or only 11.5 times its expected adjusted EBITDA. And it's targeting $850 million in adjusted EBITDA in 2026, which could provide good upside for investors today.

Expect to hear more of its plans at its investor and analyst day presentation on Sept. 20.

4. Advance Auto Parts

Christopher Niemczewski of investment company Marshfield Associates said the most brutal thing I've ever heard when it comes to auto-parts retailer Advance Auto Parts. Forbes quoted Niemczewski as saying, "We still can't figure out what they're doing wrong, and they can't, either."

This being the case, it was clearly time for new leadership at Advance. And that's exactly what this struggling stock just got.

One of the problems plaguing Advance is its supply chain. So the board of directors astutely chose Shane O'Kelly for its CEO position. He specializes in supply chain management, having most recently held the CEO position at HD Supply. He might indeed be up to the challenge of finally figuring out what Advance is doing wrong in relation to its peers -- hopefully he'll let Niemczewski know, too.

The kitchen sink has been thrown at Advance stock. In recent months, management lowered guidance, the company decreased its dividend, Advance was removed from the S&P 500, and S&P Global Ratings downgraded its debt. It's hard to fathom what more could happen to make investors feel lower than they do right now.

As bad as things are, consider that Advance still expects to earn between $4.50 and $5.10 per share this year. If O'Kelly can bring his operational know-how and quickly remedy the company's shortcomings, this could be the lowest of the lows for Advance's profits, with only upside from here.

Long term, many investors don't like the auto-parts space, but I remain a believer. According to S&P Global Mobility, cars on U.S. roads have never been older. As reported by Yahoo! Finance, the average vehicle on the road is 12.5 years old, which gives Advance a huge potential customer base.

5. PayPal

Over the long term, stocks tend to go up and down based on their profits, specifically their EPS. This is true of fintech pioneer PayPal's stock as well. But an interesting divergence is happening right now, as the chart below shows.

PYPL Chart

PYPL data by YCharts.

For a time, PayPal's EPS fell, and the stock consequently fell, too. Now, its EPS is recovering, but the stock price hasn't stopped falling. This suggests that the market simply doesn't believe in PayPal's recovery.

I think it's time to finally believe in PayPal's eventual recovery. Like Advance, the company just hired a new CEO in Alex Chriss, who is experienced at working with enterprise customers. And I believe that's significant. 

For years, PayPal's leadership has talked about leveraging its consumer data. As of the second quarter, it had over 400 million consumer accounts and has processed 24 billion transactions in the last year. It wants to find ways to grow its enterprise business, and Chriss' expertise in this area will help. Leveraging this consumer data will likely be part of the strategy.

Fortunately, recent advancements in artificial intelligence (AI) might make PayPal's dream a reality. In short, the company's dataset is amazing, but it takes something powerful to decipher it, which is where AI comes in. As outgoing CEO Dan Schulman recently said, "The AI modeling can be extraordinarily powerful as we think about the next generation of checkout and other things we can do in our value proposition."

Buying PayPal stock today is a bet on the next generation of its checkout. And I think it could play a part in market-beating upside for the stock from here.

As a closing reminder, all of these stocks are down, and for a good reason. So to be clear, investors today are betting on turnarounds that might not happen. But there is good reason to hope for each, and that's why I think they could be good buys today.