Here's how to find stocks you could still own when you're retired. Image source: Getty Images.

As a buy-and-hold investor, one of my main goals is to fill my portfolio with stocks I could hold for decades to come. While there's no way to know for sure if a stock will be a great investment 20, 30, or 50 years from now, there are some ways to identify stocks that could be good investments for as long as you're an investor. Specifically, here are three things to look for.

Use the "50-year rule"

To find forever stocks, ask yourself whether the business will stand the test of time. Has it been around for decades? Will it still be needed 50 years in the future? If the answer is a definitive "yes," it could potentially qualify as a stock you could hold forever.

A good example of a business to invest in with a "forever" mentality is banking. I'm not talking about investment banking, just good old savings-and-loan consumer banking. Sure, the reckless behavior of some industry participants tarnished the banking sector's reputation, but the reality is that people will always need safe places to store and borrow money.

Certain consumer goods businesses qualify. For example, people will always need groceries, furniture, and ways to get around. There are many other businesses that will be around forever as well.

On the other hand, will people still need televisions in 50 years? Will they still be using tablet computers? Maybe, but maybe not.

Identify a competitive advantage

Famous investor Warren Buffett coined the term a "wide economic moat." A company with a wide moat has a durable and identifiable competitive advantage that gives it a leg up on its rivals, and prevents new industry participants from stealing market share.

A strong brand name can be a competitive advantage. People are willing to pay more for Gillette shaving equipment than for lesser-known brands, which gives parent company Procter & Gamble (PG 0.91%) pricing power, and therefore better profit margins than many of its rivals.

Another potential competitive advantage is scale. Coca-Cola (KO 0.26%) not only has one of the most valuable global brand names, it also has one of the largest and most efficient distribution networks of any company in the world, allowing it to get products to their destinations at a lower cost. Wal-Mart's (WMT 0.58%) size allows it to buy products in such quantities that it can undercut the majority of its competitors.

Stick to companies with established patterns of growth

Once you've established that a business will be around forever and that a particular company has an advantage within that business, the next thing to look at is whether the company has an established track record of profitability and growth. And, while a company doesn't necessarily need to grow its profits and revenue every year to be a good long-term investment, you definitely want to look for an upward trend.

As an example, consider retail REIT (real estate investment trust) giant Realty Income Corp. (O -1.08%). Real estate is certainly a forever business, and the types of retail properties Realty Income buys are mostly occupied by tenants in lasting businesses. And the company has the advantage of scale and cheap access to capital. Finally, check out Realty Income's growth over the past decade:

O Revenue (TTM) Chart

O Revenue (TTM) data by YCharts.

The concept of an established history is an important one. While past performance doesn't guarantee future results, companies with a history of profitability certainly have a tendency to do better in the future than untested businesses.

It's completely fine to invest in companies that don't meet all three of these criteria; just be aware that the chances of being able to hold onto them and earn a good return for decades can be significantly lower.

This doesn't mean you will hold them forever

It's important to make the point that even the best "forever stocks" need to be monitored on a regular basis. There are several valid reasons you may want to sell the stocks you buy at some point. Just to name a few reasons: The company could get bought out; its competitive advantage could erode; or its management could start taking unnecessary risks.

The point is that you should approach the stocks you buy with the intention of holding them forever. Just make sure the reasons you bought them in the first place continue to apply.