The stock market has been on a fantastic run in the past year and a half. Since bottoming out in late March 2020 following the coronavirus-fueled market crash, the S&P 500 has doubled in value. This performance underscores the power of the buy-and-hold strategy.

Even when the market is experiencing downturns, staying the course -- as opposed to panic selling -- is the right thing to do. The longer you hold onto shares of great companies, the juicier your returns will be. With that in mind, let's look into two stocks that can help investors beat the market for many years to come: Abbott Laboratories (ABT 0.52%) and Visa (V 0.90%)

ABT Chart

ABT data by YCharts

1. Abbott Laboratories

The history of medical devices specialist Abbott Laboratories dates back more than 100 years. As a publicly-traded company, it has soundly outperformed the market over the past several decades. Of course, past performance isn't a guarantee of future success. But Abbott's long-standing habit of delivering solid results is a significant strength. Having been a major player in the medical devices space for a long time, the company benefits from a strong reputation. 

Physicians, like most consumers, are inclined to stick to what they know works. In addition, with the healthcare sector having significant barriers to entry, the chances of new entrants with similar expertise and industry knowledge are minimal. Furthermore, the company's rich lineup of approved devices is protected by scores of patents and copyrights, which help insulate them from competition.

One of the company's key growth drivers is the FreeStyle Libre, a continuous glucose monitoring (CGM) system that helps diabetic patients track their blood glucose levels. CGMs significantly reduce the need for painful fingersticks, making them the more attractive option for patients. The increased adoption of this technology continues to spearhead sales growth for Abbott's crown jewel.

Person holding two piggy banks, one in each hand.

Image source: Getty Images.

During the second quarter ending June 30, Abbott's diabetes care revenue came in at $1.1 billion, 40% higher than the year-ago period. The company had the FreeStyle Libre to thank for this performance. And while it competes with several other companies in this space -- most notably Medtronic and DexCom (DXCM 0.09%) -- this market will only continue to grow. According to the U.S. Centers for Disease Control and Prevention, more than 34 million Americans have diabetes, a number that is set to increase drastically in the coming years. 

This trend is unfortunate, but it underscores the need for innovative technologies to help diabetes patients manage this illness. Note that in 2020, sales of Abbott's Freestyle Libre came in at $2.6 billion, compared to DexCom's total revenue of $1.9 billion (DexCom generates revenue from the sale of its G6 CGM System as well as instruments and accessories that go along with it). Abbott looks well-placed to remain a key player in this market which, in my view, is more than enough to accommodate two or more big players. 

The company does have other devices that can drive growth, including the MitraClip, which treats mitral regurgitation (a condition in which blood doesn't flow from the heart properly), and its Tricuspid Repair System, a non-invasive device to help repair the tricuspid valve. Lastly, Abbott's business extends beyond its medical devices unit. The company's nutritional products and established pharmaceuticals segments add diversification.

Abbott Laboratories is trading at 26.8 times forward earnings, compared to the average forward price to earnings (PE) ratio of 17.3 in the healthcare sector. That makes shares of the medical devices company expensive, but in my view, it is worth paying a premium for the company. Business is still booming for this established healthcare giant, and it will be tough for competitors to knock it off its pedestal anytime soon. That makes Abbott Laboratories' stock worth parking in your portfolio for many years to come. 

2. Visa

Visa is one of those companies whose services people use daily. Many of us carry around debit or credit cards that proudly display its logo. Visa helps facilitate transactions between consumers and merchants. It does not issue credit or debit cards itself -- that's what banks are for. Rather, Visa provides the transaction processing network that supports debit and credit card purchases. The company charges fees for every transaction conducted with a card that bears its name. 

Visa's stock has performed exceptionally well since its IPO in 2008, easily beating the market from then to now. There are two main reasons why the company can continue to perform well. First, Visa's business benefits from the network effect. That is, the value of its services increases as more people use it. The company's payment network becomes more attractive to merchants as more consumers join in. And as the number of merchants increases, more consumers are likely to use Visa for payment.

This dynamic ensures that it will be challenging to eat into Visa's market share. Meanwhile, Visa's network will only continue to grow. This brings us to the second reason why the company will continue to beat the market: Exciting opportunities ahead. According to a report published by the management consulting company McKinsey, cash transactions accounted for about 28% of total transactions by volume in the U.S. in 2020. 

This figure is more or less in line with that of other developed nations, but cash is still king for developing countries. The digital payments market is projected to continue expanding rapidly.

Person sitting at a desk in front of a laptop and holding a debit/credit card.

Image source: Getty Images.

With one of the largest payment networks in the world, Visa is well-equipped to benefit. And as the financial services industry continues to evolve, it is looking to expand its reach. In June, the company announced the acquisition of Sweden-based fintech start-up Tink, which allows banks and other institutions to access financial data to build personalized banking and financial tools for consumers. The acquisition is valued at 1.8 billion Euros (roughly $2.1 billion).

Visa's shares aren't cheap either -- they currently trade for 46.05 past and 39.13 times forward earnings. But note that Visa's closest competitor, Mastercard (MA 0.45%), has a PE and forward PE ratio of 49.34 and 43.62, respectively. While those two companies dominate the industry, Visa holds the edge. For the fiscal year 2019, Visa had a higher payment volume ($8.9 billion vs. $4.8 billion), higher total transactions (207 billion vs 122 billion), and more cards to its name (3.4 million vs. 2.2 million).

Visa also generates higher revenue and profits. For their latest reported quarters, Visa's top line came in at $6.13 billion -- higher than Mastercard's $4.53 billion. Visa's shares aren't that expensive when put into context. And given the company's competitive advantage and growth prospects, it will continue delivering strong financial results, thereby pushing its share price ever higher.