In the stock market, past performance isn't a guarantee of future success. Still, it's worth considering investing in companies with a habit of beating the market. If said company can replicate the formula (or something close to it) that has made it successful in the past, it may still have what it takes to deliver above-average returns.

Let's look at two stocks that boast impressive track records in the stock market: DexCom (DXCM 0.33%) and Netflix (NFLX -0.51%). For investors who might have missed out on either company, it's not too late to get in on the action. 

Chart showing Netflix's and DexCom's prices beating the S&P 500's since 2015.

DXCM data by YCharts

1. DexCom

DexCom is a medical devices specialist. Thanks to its G6 device, it is a leader in the market for continuous glucose monitoring (CGM) systems. CGM technology allows diabetes patients to track their blood glucose levels automatically throughout the day. One major reason DexCom has been so successful is the increased adoption of CGM technology. It isn't hard to see why it's becoming more and more popular among those with diabetes.

Blood glucose levels fluctuate throughout the day. Diabetes patients who use blood glucose meters (BGMs) can only tell their blood glucose level at a particular point. That's not to mention the fact that BGMs rely on painful fingersticks. In contrast, CGMs continuously keep track of this critical metric for diabetes patients and generally don't rely on fingersticks.

DexCom's G6 does 288 readings per day -- or one every five minutes. Overall, CGM technology is associated with better health outcomes for diabetic people.

DexCom's CGM device and accessories.

Image source: DexCom.

DexCom has benefited from the rising popularity of CGMs with growing revenue. Last year, the company's top line jumped 27% year over year to $2.45 billion. Its adjusted net income per share for the year decreased to $2.66, compared to the $3.10 reported during the year-ago period. DexCom recently fell along with the broader market in a sell-off that was especially tough for growth stocks. However, there are excellent reasons to be optimistic about the company's future.

First, it's getting ready to launch a brand-new product, the G7, which will offer even better health outcomes for its target population.

In fact, DexCom recently earned a regulatory decision that will allow it to market the G7 in Europe. It already submitted an application for regulatory review for the G7 in the U.S., and the device could earn clearance before the end of the year. Second, CGM still has a long way to go. Even in the U.S. -- a worldwide leader in the adoption of the technology -- it enjoys relatively low penetration.

DexCom is well-positioned to remain a leader in this market that's on an upward trajectory, and that's why the company's future still looks bright. 

2. Netflix

Netflix performed splendidly in the past decade, but the company is arguably going through its toughest period in some time. Here are just some of the issues it's facing.

First, there is competition. The number of streaming platforms has ballooned over the past few years. Consumers have more choices than ever, affecting the company's ability to attract new subscribers.

And that brings us to our second point: Netflix's net paid additions have been unimpressive (to say the least) for the past couple of quarters. In the first quarter, the company lost 200,000 subscribers, which came up short of its projection of new additions totaling 2.5 million. That's a big reason Netflix's shares have been hammered recently. 

Third, the company is dealing with a password-sharing problem. It estimates that some 100 million households are logging into its platform with borrowed passwords. That's in addition to the 222 million paid subscribers it had as of the end of the first quarter.

Despite these issues, there is a crucial point Netflix's management keeps mentioning: Streaming platforms still do not control most of TV viewing time in the U.S. In February, streaming accounted for just 28.6% of the total. So there is still plenty of room for streaming to overtake broadcast and cable. The question is how Netflix can perform well in this environment. The company is looking at multiple options, including some that have shown success in the past.

Netflix will continue to focus on producing high-quality content to keep consumers engaged and entertained. That will no longer be enough, however, and the tech giant will have to look elsewhere. Management is contemplating multiple options, one of which is introducing lower-priced plans that display ads. This could entice some households that engage in password sharing to obtain their own subscriptions. The company has also been making a move into gaming.

Even though the near-term looks muddy for Netflix, the company's name recognition, cash-flow generation, and history of shrewd capital allocation strategy should help it turn things around. I don't expect Netflix to deliver the kinds of returns it did during the 2010s, but in my view, there is still plenty of fuel left in the company's growth engine.