To buy and hold stocks for a lifetime isn't easy. You should not only be able to ignore the day-to-day meanderings of the stock market, but also be headstrong enough to cut through the noise and hold on to your conviction, year after year.

However, investing for really long periods of time becomes easier if you bet on industry stalwarts that have consistently rewarded shareholders and possess strong growth catalysts to keep them going for years to come. I can think of four such "forever" stocks right now: Canadian National Railway (CNI -0.56%), Waste Management (WM 0.06%), Mastercard (MA 0.28%), and Visa (V 0.42%).

There's a common link between all four companies: They enjoy an economic moat and are into businesses that should be around decades from now.

Railroads are crucial for the economy

Do you know how important railroads are to the economy? Railroads haul nearly 35% of all exports from the U.S. and support economic activity worth more than $270 billion annually. The crucial role that they play in transporting goods and facilitating trade and commerce, combined with the capital-intensive nature of the industry that acts as a high barrier to entry, makes Canadian National Railway a buy-and-hold forever stock.

Plants growing on stacks of coin in soil, depicting growth of income over time.

If you can buy and hold fundamentally strong stocks forever, you should make a lot of money. Image source: Getty Images.

Let's be clear: Canadian National won't grow like gangbusters. Railroading is, after all, a cyclical industry with fortunes tied closely to the health of various sectors, so there'll always be some bumps along the way. Nonetheless, Canadian National is a slow-and-steady winner that has proved its mettle. Otherwise, the stock wouldn't have earned investors a hefty 250% in total returns in the past decade, a period that witnessed a painful commodities down cycle.

Canadian National stands out for several reasons. As the only transcontinental railroad in North America that spans three key coasts -- the Atlantic, Pacific, and Gulf of Mexico -- Canadian National has an unparalleled market reach with nearly 20,000 route-miles. The company is also one of the most cost-efficient railroads and a dividend stalwart, having increased its dividends every year since 1995 and growing it at a solid compound annual rate of 16% in the past 22 years.

In fact, without that dividend growth, Canadian National's historical returns would've been much smaller. Now if a cyclical company could grow its dividends every year for more than two decades through several downcycles, what are the chances it won't be able to in the future?

Someone needs to clean up all that waste

A lot could change decades from now, but we'll probably not stop generating waste, and Waste Management won't stop making money out of waste collection and treatment.

You see, Waste Management is North America's largest waste management and recycling company, with 127 gas-to-energy landfill facilities and 102 recycling plants. That's also the largest landfill network in the industry. Now that's an incredible competitive advantage to have in the industry. In fact, other waste haulers also use Waste Management's landfill facilities to dispose waste for a fee, known as a tipping fee. I dug up the company's financials and found out that nearly 23% of its total revenue last year came from tipping fees.

A garbage truck dumping waste in a landfill site.

Image source: Getty Images.

Thanks to a dominant position in a resilient industry and a strong balance sheet, Waste Management's cash flows have grown steadily over the years to support uninterrupted annual dividend increases for 15 consecutive years.

So how fast has its dividends grown? Consider that without dividends, Waste Management  stock nearly doubled in the past decade; but with reinvested dividends, the stock nearly tripled over the same time period. Small wonder, then, that Waste Management remains one of the biggest holdings in Bill Gates' portfolio. You and I may not be billionaires like Gates, but we can surely pick stock ideas from his portfolio and bet some of our money, especially when the stock's a resilient, growing dividend-paying company like Waste Management.

Digital is the future of payments

Nearly every company today wants to go digital. It's impossible to ignore the megatrend, and if there's one area that could grow leaps and bounds, it's digital payments. You might have been using credit and debit cards for a long time now, but did you know that a whopping 80% of global consumer transactions are still cash-driven? And that noncash transactions are projected to grow at a record compound annual rate of 10.9% between 2015 and 2020, according to Capgemini and BNP Paribas' 2017 World Payments report? That's not really surprising, given the phenomenal rise in e-commerce, mobile wallets, and online payments systems.

A finger punching numbers into a card-swipe machine with a card inserted in it.

Image source: Getty Images.

The opportunities are huge for payments processing giants, Mastercard and Visa. Both companies have minted massive amounts of money for shareholders in recent years, and they're unlikely to stop, thanks to the incredible economic moat called "network effect" that they enjoy. Put simply, it refers to how the value of certain products and services grow as usage climbs. So as more manufacturers, service providers, and banks go digital, more people will use credit and debit cards, and as more people use the cards, more businesses will accept them and thus more people will want to use them ... thereby earning Mastercard and Visa higher fees as transaction volumes rise.

Payments processing is also an asset-light business, which partly explains why both Mastercard and Visa have consistently generated operating margins north of 50%, which is unheard of in most industries. It's a powerful business with visible growth catalysts, which is why I consider Mastercard and Visa great "forever" stocks.