If you entered 2020 wondering whether you have the stomach to invest in the stock market over the long term, the past four months have likely answered that question.

The uncertainty tied to the coronavirus disease 2019 (COVID-19) pandemic initially caused the broad-based S&P 500 to crater at a faster pace than we've ever witnessed before. It took only 17 trading sessions for the widely followed index to lose at least 20% of its value (officially marking a bear market), and 33 calendar days to peak at a loss of 34% on March 23.

However, in the subsequent 11 weeks, we've witnessed the benchmark S&P 500 bounce more than 40% off of its lows, and watched as the technology-heavy Nasdaq Composite crested the 10,000-point plateau for the first time ever. Investors who didn't have a long-term mindset and panic-sold in late February or March are likely kicking themselves.

Even though every bounce-back from a bear market bottom over the past 60 years has featured at least one double-digit percentage correction within three years, this shouldn't discourage investors from buying into high-quality companies that've led this rally higher and may be near their 52-week highs. If you have, say, $3,000 in disposable income that could be used for investment purposes (i.e., won't be needed to pay bills or cover emergencies), the following three stocks remain worth buying.

A businessman holding a potted plant in the shape of a dollar sign.

Image source: Getty Images.

Amazon

Earlier this week, RBC Capital upped its price target on Amazon (NASDAQ:AMZN) by $600 to a new Wall Street high of $3,300. Covering analyst Mark Mahaney cited Amazon as a "structural winner" of the COVID-19 pandemic and estimated in his firm's research report that Amazon would see worldwide Prime subscriptions near 200 million. While I agree with Mahaney's thesis, I still don't think he, nor any Wall Street analyst, is giving Amazon enough credit.

A lot of eyeballs are obviously attracted to Amazon's e-commerce segment, and for obvious reasons. If Amazon is collecting Prime membership fees from close to 200 million people worldwide, it's able to use this cash to offset already thin retail margins, as well as continue to undercut brick-and-mortar retailers on price. In other words, it firmly establishes Amazon as a dominant force in e-commerce, with around 40% of all online market share in the United States.

But there's still nowhere near enough credit being levied on Amazon's cloud operations, Amazon Web Services (AWS). With the work-from-home trend really taking off in recent months, the demand for cloud infrastructure-as-a-service is only going to strengthen. For Amazon, this is incredibly important, given that the operating margins associated with cloud infrastructure services are many, many times higher than retail or ad-based margins. Between 2019 and 2023, it's very plausible that Amazon's cash flow per share will nearly triple to over $200, almost entirely due to growth in AWS.

Considering that Amazon has regularly been valued at 23 to 37 times its operating cash flow over the past decade, a price target of $5,000 to $5,500 by 2023 would be reasonable. Even with Amazon pushing to a new all-time high, there appears to be an incredible amount of upside still left.

A physician using a finger prick device on a young diabetic patient.

Image source: Getty Images.

Livongo Health

Another seemingly unstoppable company of late is healthcare-solutions provider Livongo Health (NASDAQ:LVGO). Shares of Livongo have now more than tripled from their March 2020 lows and more than doubled its initial public offering price from last summer. Despite this incredible run, we're still witnessing the very early innings for this company, which means there's still plenty of time for investors to buy in.

Livongo Health's goal is to help patients with chronic illnesses live healthier lives. Currently, its focus is on aiding the 34.2 million Americans with diabetes. While the co-morbidities that diabetics deal with are dangerous, it could be argued that diabetics failing to stay on top of their disease contribute just as much to their struggle to stay healthy. Livongo fights this by aggregating mountains of data on their members and using artificial intelligence to help incite behavioral changes in its members. According to an investor presentation from May 2020, more than 40% of its members have benefited from these "nudges" to drive behavioral change. 

It's important to understand that this isn't just a feel-good story on paper -- Livongo's business plan is working wonders in the very early stages. Diabetes member count has essentially doubled for three consecutive years, topping 328,000 members in the first quarter of 2020. What's more, the company has also produced two consecutive quarterly profits.

Think about this for a moment: Livongo doesn't even have 1% of U.S. diabetes market share (let alone the 88 million Americans with prediabetes symptoms) and is ready to expand its services to include hypertension and weight management -- and it's already profitable! This company is going to be an absolute juggernaut in a decade and beyond.

A person inserting their credit card into a Square point-of-sale reader.

Image source: Square.

Square

Despite being fundamentally pricey, which is the case with Amazon and Livongo, as well, investors with $3,000 to work with should strongly consider buying into Square's (NYSE:SQ) long-term growth story. For decades, it's been virtually impossible for new companies to penetrate a payment-processing space that's been dominated by the likes of Visa, Mastercard, and American Express -- but that's exactly what Square has been able to do.

Once known for its appeal to small businesses, Square has become a more favorable option among sellers with higher annualized gross payment volumes. This is simply a fancy way of saying that Square is gaining share with larger businesses in an economy that's driven by consumption. That's a good thing and should lead to higher fee generation in the years to come.

But the evolution of Cash App looks to be Square's golden ticket. Although its seller ecosystem and lending services will continue to generate profits during expansionary periods in the U.S. economy, Cash App is the real moneymaker here. After more than tripling monthly active members in a span of two years, Cash App delivered 115% gross profit growth in the COVID-19-impacted first quarter. The ability to send and receive money, invest directly from Cash App, and tie your Cash App balance to Cash Card for more traditional use has made the application increasingly popular and profitable. 

It's not out of the question that we're talking about Square as a $300 billion-plus market cap company by 2030.