Buying shares of a stock when it is falling can be a way to set yourself up for some gains later on when the business bounces back. But not every struggling stock is going to recover, so it's important to understand the reason for a decline. If the business itself is solid, a drop in value may simply create an attractive opportunity to invest.

Three stocks that have been falling in recent weeks that could be great buys today are Amgen (NASDAQ:AMGN)Alibaba Group Holdings (NYSE:BABA), and Dollar Tree (NASDAQ:DLTR). They have all fallen more than 7% in the past month (the S&P 500 is up over 2%), but there's a lot to like about these businesses over the long haul. 

Business people looking at a tablet.

Image source: Getty Images.

1. Amgen

Drugmaker Amgen is a relatively cheap stock to own today, trading at a price-to-earnings (P/E) multiple of 23 (the average stock in the Health Care Select Sector SPDR Fund is trading at 27 times its profits). And yet, the stock continues to fall. At about $226, it is getting closer to its 52-week low of just over $210.

Many healthcare companies have been struggling amid the pandemic as hospitals and doctors have been shuffling priorities in an effort to keep COVID-19 under control. During the first three months of the year, Amgen's revenue of $5.9 billion declined 4% year over year; the company blamed the poor results on the pandemic and patient visits being down. However, for the period ending June 30, sales of $6.5 billion were up 5% as the company was starting to benefit from a recovery in the economy. Its drug for high cholesterol, Repatha, showed exceptional performance, with revenue rising 43% from the same period last year.

Over the longer term, the company will get a boost from its lung cancer drug Lumakras. The U.S. Food and Drug Administration granted accelerated approval for the drug (which means another trial is still necessary) in May. According to analysts, Lumakras could generate more than $1.4 billion in revenue for Amgen as early as 2023.

The surge in cases of the delta variant of the coronavirus, and the subsequent  uncertainty surrounding the economic recovery, may be one of the reasons investors are once again bearish on Amgen. Given its low earnings multiple and 3.1% dividend yield (above the S&P 500 average of just 1.3%), there's a lot to like about this stock without even factoring in its growth or its potential as a "recovery play."

2. Alibaba

E-commerce giant Alibaba is an intriguing stock because it has the potential to deliver incredible returns or equally startling losses -- it all depends on the Chinese government and what remains a risky political environment, especially given that relations with U.S. don't appear to be improving. Earlier this year, China assessed a $2.75 billion antitrust fine on Alibaba stemming from its monopoly power.

If you are OK with taking on risk and uncertainty, there's loads of potential here. As one of the country's top tech companies, Alibaba trades at a P/E of only 21. That's cheap for a tech stock. Amazon and Shopify, which also run large e-commerce platforms, trade at multiples of 61 and 80, respectively. Investing in the China-based company may provide a good hedge for North American investors who are worried about COVID-19, as case numbers in China have remained relatively stable compared with the rest of the world. And that can translate into some strong, consistent growth.

Alibaba's revenue of $31.9 billion for the period ending June 30 was up 34% year over year. While commerce is still its bread and butter, generating 87% of its revenue, the growth in cloud computing could offer promising opportunities in the future -- that segment accounted for just 8% of sales but grew at a rate of 29%.

The tech stock is coming off 52-week lows, and it's still a cheap investment to own. While there's some risk here, the company is a major player in e-commerce. And although fines may shrink its bottom line, that shouldn't take away from its potential over the long term.

3. Dollar Tree

Discount retail stock Dollar Tree is another business that investors have been bearish on amid inflation and rising freight costs. The retailer is one of the top importers in the country, and management anticipates that shipping-related issues will not resolve themselves anytime soon. Dollar Tree noted on its recent earnings call that industry experts believe capacity won't increase until 2023 (when there will be more ships available for transport), at which point costs should decline.

That sounds like bad news, but what I like about it is that the company is baking in some low expectations for the future. As investors know, it's the way a business executes against expectations that typically dictates how its stock performs. Lowering the bar will make it easier for the company to outperform and deliver a surprise result in future earnings reports. For fiscal 2021, Dollar Tree projects that its net sales will be a little over $26 billion (in 2020 they were at $25.5 billion) and diluted earnings per share will be within a range of $5.40 to $5.60 (versus $5.65 last year).

Like the other stocks on this list, Dollar Tree isn't an expensive buy, trading at a P/E of just under 15. This is less than the 21 times earnings that investors are paying for rival retailer Dollar General. But if you're planning to hang on to the stock for awhile, Dollar Tree could be an underdog worth buying right now. While it's not at its 52-week low of $84.41, it's getting close to that level.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.