The key to successful investing is elusive for some, but I believe it boils down to two things: buying shares in quality companies and holding those shares through both the triumphs and failures that occur during the life of every company.

The hardest part of this process can be resisting the temptation to sell -- for a variety of reasons. When doubt or uncertainty regarding the future hits, or the stock price has doubled (or even tripled) in a short period of time, many investors see an opportunity to cut their losses, or lock in profits. There isn't anything wrong with that, but I believe that the path to significant gains remains holding for the long term.

This isn't merely a mental exercise. I've held each of these companies for at least three years -- and some for much, much longer. Here's why I believe I will be holding The Walt Disney Company (DIS 1.23%), Alphabet Inc. (GOOGL 0.72%) (GOOG 0.82%), and Netflix, Inc. (NFLX -1.03%) indefinitely.

Businessman working on a digital tablet, with a city panorama and a raising arrow as a backdrop.

These stocks represent great opportunities over the long term. Image source: Getty Images.

Largest treasure trove of intellectual property around

Nobody has mastered the art of leveraging intellectual property better than Disney, and that's why I've been a shareholder for more than eight years. The company already had one of the largest and best-loved collections of characters in the world, and that was before it purchased Pixar, Marvel, and Lucasfilm. Disney has been making hit movies for decades, but that's just the beginning of the process. The characters from the movies find their way into toys, apparel, and household goods, while becoming attractions at the company's multiple theme parks and staples on its broadcast and cable networks.

Every company faces a period of uncertainty and Disney is no different. Investors have increasingly focused on the loss of subscribers at ESPN, the company's flagship sports network, but I believe they are placing far too much weight on the issue. Even in the face of declining subscribers, Disney grew revenue 6% last year to a record $55.6 billion year over year, while earnings increased 12% to a record $9.4 billion. Flat results in the media networks segment -- where ESPN revenue is located -- was more than covered by impressive growth resulting from hit movies and increased visits to its theme parks. 

So much more than search

Alphabet is primarily known for its ubiquitous search engine, but the company offers investors so much more, which is why I've owned shares for more than three years. Its YouTube service has over 1.5 billion daily active users, and is a plentiful source of new advertising revenue. Android is the most widely used mobile operating system in the world, which provides a large user base for the company's continued growth in other areas. Google has made significant advances in artificial intelligence, a field which is only in its infancy, and its recently released Google Home speaker is quickly emerging as a serious contender to take the crown from Amazon.com, Inc.'s Echo family of smart speakers. The company's Waymo self-driving car unit is arguably the most advanced program of its kind, and its partnership in ride-hailing could provide a glimpse of the future.

These emerging technologies are not yet producing significant income for Alphabet, but they lay the foundation for future growth. Last year, Alphabet increased its revenue to over $90 billion, up 20% over the prior year and net income that grew 23% year over year. This is phenomenal growth for a company its size. Combine that with the multiple platforms for future opportunities and you can see why I don't expect I'll ever be selling shares of the search giant.

Disrupting linear TV

Netflix was the pioneer of online streaming and has come a long way from the familiar red envelopes that delivered DVDs by mail. After perfecting its streaming model in the U.S., Netflix took its show on the road, introducing its fare to over 200 countries around the world. The company now boasts over 100 million subscribers worldwide and that number continues to grow.

Some investors are concerned about the increasing obligations the company incurs to develop new shows and the resulting negative cash flow, but its growing library of original content attracts new subscribers, which funds new content, resulting in a virtuous cycle that should continue to fuel growth. The company also has a potential billion-dollar opportunity selling merchandise related to its hit shows.

In the last year, Netflix generated $8.3 billion in streaming revenue, an increase of 35% year over year, and grew its subscriber base to 94 million, a 25% increase over the prior year. The company also achieved profitability ahead of schedule from its worldwide expansion and continues to expand its local content offerings. Netflix was one of my very first investments and the largest single holding in my portfolio. I've held the stock for nearly a decade, and I don't plan on parting with any shares for the foreseeable future.