Some stocks might struggle to gain market traction, but that doesn't necessarily mean they are bad investments. There are plenty of valid reasons a stock underperforms what investors expect. It could be as simple as the stock not offering what the market is looking for at that particular time.

For long-term investors with the patience to give great companies with struggling stocks a chance, this kind of situation means opportunity. Let's take a look at five opportunities to get a struggling stock at a discount and potentially add a great company (or companies) to your investment portfolio.

1. PayPal

PayPal's (PYPL 2.90%) stock price peaked roughly two years ago and it has struggled ever since. The stock has dropped like a rock since topping out at more than $309 a share in July 2021. Now, it trades for around $70, a level not seen since 2017. A lot of that downturn was self-inflicted as the company failed to meet growth goals and generated some poor performance, but this stock sell-off has been overdone.

PayPal is expected to grow its earnings per share (EPS) significantly this year, with the average analyst projecting an EPS of $4.95. That puts the stock at an ultra-low forward price-to-earnings valuation of 14 times, which is an absolute bargain for this leading online payments provider.

Also aiding PayPal's performance in 2023 is the expectation of an extra $1 billion in stock buybacks. That was made possible after PayPal struck a deal struck with KKR to buy up to 40 billion euros ($44 billion) of PayPal's buy now, pay later loans that originated in Europe. This recent news is another example of a company still executing well.

PayPal stock looks cheap, and the underlying company is still a strong business, making this an excellent turnaround candidate for your portfolio.

2. CrowdStrike

While this may surprise some investors (because the stock is trading up over 40% so far this year), CrowdStrike (CRWD 2.03%) stock hasn't seen the same level of price performance as its software peers. There are concerns in the market about CrowdStrike's longer sales times, which could lead to slower revenue growth. 

However, management's guidance for the second quarter of fiscal 2024 (ending July 31) still indicates 35% year-over-year revenue growth. CrowdStrike also increased its 2024 guidance during its first-quarter report, so it's not struggling as badly as some analysts believe.

Cybersecurity is a growing industry, and most businesses haven't added the protection they need, leaving plenty of upside potential for CrowdStrike to capture. With the company just turning profitable and trading at a price-to-sales (P/S) ratio of 14 (much cheaper than many of its software peers), the stock is a great buy here.

3. MercadoLibre

MercadoLibre (MELI 3.09%) has become the dominant e-commerce company in Latin America. Even if the growth rate has somewhat slowed, it continues to post strong growth quarter after quarter.

MELI Revenue (Quarterly YoY Growth) Chart

MELI revenue (quarterly YoY growth) data by YCharts. YoY = year over year.

The market is also a bit worried about a new law in Brazil that taxes cross-border transactions that might be detrimental to MercadoLibre's e-commerce business. As a result, the stock now trades at its lowest valuation since the financial crisis of 2008 and 2009.

MELI PS Ratio Chart

MELI PS ratio data by YCharts.

This is an absurdly cheap stock for a great (and growing) business, and MercadoLibre isn't going to let one of the largest Latin American markets slip away. The current weakness is an excellent opportunity to purchase the stock, as the company has dealt with uncertainty in various Latin American countries for years.

4. Twilio

Twilio (TWLO 1.47%) is one of the pandemic stocks that fell on hard times in the tech crash in 2022 and hasn't seen much of a recovery in 2023. The concern here is that its business has substantially slowed, with revenue only growing 15% year over year in the first quarter and projected to grow by just 5% in the second.

However, because Twilio prices its application program interfaces on a consumption basis, it's not far-fetched to think this weakness is temporary. Many companies at the moment are looking to cut costs any way they can, and not expanding the use of a consumption-based product is one way to save.

As a result, Twilio will likely see another surge of growth as economic uncertainty subsides. While the next year or so could be shaky, the future still looks solid, as Wall Street analysts project 11% growth in 2024.

But the real kicker for Twilio is its price: a dirt-cheap 3 times sales.

TWLO PS Ratio Chart

TWLO PS ratio data by YCharts.

The stock has never looked this cheap and is worth a small investment on its valuation alone. Throw in a business that could see some recovery in the coming years, and you have a strong candidate for a turnaround play.

5. Autodesk

Autodesk (ADSK 0.71%) holds a unique position with its clients: They cannot afford to drop the product. Engineers and architects use Autodesk's products daily to perform their jobs, so the company has locked in steady revenue growth.

With sales projected to rise by 8% in a year when many businesses aren't expanding, it's a solid performance for Autodesk. But the stock hasn't seen a recovery like its software peers in 2023, as it's only up 11%.

With a cheap 8.8 P/S, the stock has a decent amount of upside. Plus, the company is fairly recession-proof, since its product must be renewed yearly. Wall Street analysts are also bullish, with the average fiscal 2024 EPS target coming in at $7.28, which values the stock at 29 times forward earnings -- not a bad price for a stable software stock.

Autodesk might not light the world on fire this year with its growth, but its future is still strong.