After climbing by about 29% last year, the S&P 500 has slid by about 14% year to date as a result of the COVID-19 pandemic. However, some companies have largely escaped the recent sell-off and have performed well, even though the ongoing public health crisis has significantly slowed down economic activity. Tandem Diabetes Care (NASDAQ:TNDM) and Amazon (NASDAQ:AMZN) are two such companies. Here is why I believe Tandem Diabetes and Amazon can continue performing well as long as the COVID-19 outbreak lasts. More importantly, I think they are both strong long-term picks that can earn you solid returns for many years to come. 

TNDM Chart

TNDM data by YCharts

Improving the lives of people with diabetes

Tandem Diabetes is a medical device company which, as its name suggests, develops products for people with diabetes. The company's signature device is its t:slim X2 insulin pump, which is designed to greatly simplify the lives of insulin-dependent diabetes patients. This device boasts several interesting features. For instance, the t:slim X2 insulin pump can monitor patients' blood sugar levels and automatically adjust the amount of insulin it delivers as needed. Tandem Diabetes argues that its t:slim X2 insulin pump is a better product -- particularly in terms of ease of use -- than similar competing devices, including Medtronic's (NYSE:MDT) MiniMed 670G.

Thanks to its t:slim X2 device, Tandem Diabetes's revenue has been growing at a good clip. During the fourth quarter of its fiscal year 2019, the company's shipment of insulin pumps increased by 21% to 19,602. Sales of $108.4 million were also up 42% compared with the year-ago period. And while the company's net income of $2.7 million was down 27% year over year, that figure included about $18.9 million in non-cash charges related to stock-based compensation and a change in the fair value of warrants.

Tandem Diabetes is set to continue performing relatively well, even during this crisis. The healthcare company recently said that its warehouse and manufacturing facilities haven't been affected by the ongoing outbreak and continue to "operate as normal." Tandem Diabetes also does not expect its supply chain and the shipment of its products -- including its t:slim X2 insulin pump -- to be severely affected.

Doctor wearing a sign that says diabetes.

Image source: Getty Images.

Beyond the current crisis, the company sees significant opportunities for growth in the U.S. and abroad. In the U.S., about 70% of insulin-dependent diabetes patients continue to rely on multiple-dose injection (MDI) therapy. Outside the U.S., at least 80% of diabetes patients still rely on MDI therapy. Tandem Diabetes thinks that many of these patients will eventually drop MDI therapy in favor of insulin pumps, and the company is looking to capture a good share of this market.

Tandem Diabetes's goal is to have half a million customers by 2025, up from 142,000 at the end of 2019. According to researchers at Meticulous Research, the digital diabetes market is set to grow at a compound annual growth rate (CAGR) of 21.7% through 2025, and this market will be worth about $12 billion by then. Tandem Diabetes could be one of the winners of this trend, and I expect the company's stock to continue climbing for the foreseeable future. 

Amazon continues to thrive

With social distancing measures in place to help curb the spread of COVID-19, people are spending more time at home, and many of them are opting to make even more purchases online than they usually would. As one of the leading e-commerce companies, Amazon is well-positioned to benefit from this trend. In fact, Amazon recently went on a hiring spree to handle the increased activity on its platform.

Beyond its e-commerce sales, Amazon's video streaming platform -- Amazon Prime Video -- could also benefit from the ongoing crisis, as people spending more time at home could boost viewership. These factors (and others) should leave the company's financial results relatively unscathed -- or at least not significantly negatively affected -- by the ongoing crisis.

Even without these developments, Amazon is a stock worth buying. In 2019, e-commerce sales in the U.S. accounted for about 11% of the total, according to the U.S. Census Bureau. In other words, there is still a lot of room to grow for this industry, and few companies are in a better position to profit from this trend than Amazon. The company also has its hands in several other sectors, including cloud computing, where it remains one of the leaders. Thanks to its diversified sources of revenue, and its strong position across several industries, Amazon will continue to perform better than most regardless of economic conditions, and the company's stock will continue to outperform the broader market. In short, now is as good a time as any to buy shares of Amazon.