The best investing returns come from buying and holding great companies for the long term. By letting business performance and compounding lead the way, holding a stock for a decade or more can pay off massively for investors. 

While that sounds easy, it can be more challenging than it seems. Not only do investors need to make sure they're identifying great businesses, but they also have to have the conviction and stomach to hold them through tough times.

Here are three companies that not only have proven themselves on the public markets, but are also leaders in industries with promising futures. Let's dig in and see why.

The Trade Desk

By this point, there's a good chance that almost everyone subscribes to a streaming service or knows someone who does. That's a drastic shift from even a few years ago when "cutting the cord" and leaving linear broadcast television was relatively novel. This shift from everyone watching the same thing to each consumer choosing their content has been great for consumers, but it has also disrupted the advertising business.

Gone are the days of planning an advertising campaign that everyone would see, with little data on its effectiveness. Now advertisers can target the specific viewers it wants to, and get detailed data on the back end about the impact of their advertisements. This has been made possible in large part because of The Trade Desk (TTD 1.67%).

By creating a platform that matches buyers and sellers of advertisements, especially for connected TV, The Trade Desk has grown quickly as a business. In fiscal year 2022, The Trade Desk grew its revenue by 32% over the previous year. That was nothing new. Since 2015, the company has never had revenue growth of less than 26%.

This impressive growth has been due to strong, profitable, business execution, but it was also aided by the steady shift to connected digital media consumption. The company believes the total addressable market for global ad spending could be approximately $830 billion. That estimate may be optimistic, but with the recently launched ad-supported tiers of Netflix and Walt Disney's Disney+ streaming service, there are real-life examples of the success of digital programmatic advertising.

Fortinet

Cybersecurity is another industry that is projecting massive growth over the coming years, and Fortinet (FTNT 0.23%) is poised to continue to be a leader in the space. Fortinet may not be as well known as some of its headline-grabbing competitors, but it has quietly been an incredibly consistent, profitable, cash-generating business. 

Fortinet estimates its total addressable market to be $180 billion, growing to $208 billion by 2026. To put that in perspective, Fortinet's trailing 12-month revenue was $4.4 billion, second in the sector only to Palo Alto Networks. This means that without gaining any more market share, Fortinet can continue to succeed simply by continuing to grow as the market grows.

Fortinet expects its full-year 2023 revenue to be $5.5 billion, which would represent a 24% increase over 2022. This would be a continuation of remarkably consistent revenue growth over Fortinet's life as a public company. In fact, Fortinet's average year-over-year revenue growth since its initial public offering has been 25%.

The story has been similar for profitability. Over the past 10 years, Fortinet has grown its net income and free cash flow impressively, all while reducing its number of shares outstanding.

FTNT Net Income (Quarterly) Chart

FTNT Net Income (Quarterly) data by YCharts

This shows that Fortinet has not only grown its business over a long period of time, but it has also run it more efficiently and used the resulting cash flow to return value to its shareholders. 

The bottom line for investors

Both The Trade Desk and Fortinet operate in industries that are important now and that will remain important for the foreseeable future. These two businesses also have track records of being market-beating investments. Over the past five years, these two stocks have massively outperformed the S&P 500 and have done so while being profitable and generating cash. Buying these companies and holding them for the next decade seems like a no-brainer to me.