The fundamental premise of investing is to spend years accumulating funds and to have that money compound over time. For traditional investors, time is the fundamental variable. The more time you have to invest, the greater your wealth can grow to become. To maximize this concept, you need to know how to pick stocks for long-term profit.

While it’s true that over a long-enough time horizon most stocks appreciate—with charts that move up and to the right—every stock appreciates at different rates. Moreover, the type of company you invest in can dictate how it’ll perform over certain periods. Growth stocks vs. Dividend Aristocrats, for instance.

If you’re new to investing and trying to build a portfolio that’ll ensure you have enough to retire comfortably with, here’s a crash course in how to pick stocks for long-term profit.

An investor learns how to pick stocks for long-term profit

Rule 1: Look for Consistent Earnings Growth

If a company is going to return value to shareholders, it needs to remain profitable over the long-term. When picking long-term investments, look for companies that have a demonstrated ability to generate sales and to grow earnings. More importantly, look for companies that have strong market share and the ability to command sales at a rate that’s equal to or greater than their competitors. Companies that capture, hold and leverage market share effectively stand poised to maintain long-term profitability. Along this same vein, look for companies with strong profit margins, which signal flexibility and control over cash flows.

Rule 2: Gauge Strength Relative to the Industry

Speaking of competitors and market share, get to know how companies perform with the context of their industry. Recognize that there are several sectors within each industry, and multiple tiers of players within each sector. For instance, the tech industry has software companies (MSFT, ADBE, ORCL), semiconductors (NVDA, AVGO, INTC), communication tech (CSCO, MSI, ZBRA) and countless others. Figure out who the players in each sector are and which ones are likely to hold or gain market share over the span of your investment horizon.

Rule 3: Be Mindful of Debt-to-Equity Ratio

Debt helps companies grow and can be a useful tool in creating opportunities for future success. But too much debt can hamper a company’s growth prospects and make it difficult to return value to shareholders. When assessing long-term investment opportunities, look at how the company uses debt. Specifically, check the debt-to-equity ratio and understand how leveraged the organization is. If the company has a track record of paying down its debts or if it’s generating revenues in excess of its debt load, it tends to signal responsible debt use.

Rule 4: Look for Reasonable Valuation

What you pay for a company today affects how that investment will grow over your time horizon. This is why it’s so important to look at valuation. A company with a stock price that’s tens of multiples higher than its intrinsic value carries a risk of inflation. Stocks that are already expensive won’t necessarily appreciate as quickly as their peers, and they’re more likely to suffer significant pullback if the market corrects. Look for companies that are at or below the average P/E of the S&P 500. Similarly, gauge metrics like P/B, PEG and P/S to see how “expensive” or “cheap” a stock is relative to different valuation metrics.

Rule 5: How Does the Company Use Revenue?

Always investigate how a company uses its revenue before investing long-term. Simply generating strong revenues isn’t enough for a company to thrive. Is it reinvesting in R&D? Expanding through M&A activity? Does it issue a dividend? Has it raised its dividend? Does it pay down debts or finance new initiatives? Following the trail of money will help investors learn what a company is doing to keep itself attractive to investors and relevant in its markets. This is also important to monitor growth-focused companies that aren’t yet profitable. What’s their path to profitability and how are they working toward that profitable future today?

Rule 6: Evaluate Leadership

Even great companies will encounter trials and tribulations over the years. What matters most during times of adversity is great leadership. Companies with a strong CEO, C-suite and board of directors will find ways to adapt and pivot, to preserve the company’s profitability and its public image, so it can continue to flourish. Invest in companies that have proven leadership teams and that are capable of retaining or cultivating leaders over time.

BONUS: Invest in What You Know and Understand

One of the simplest and most important tips for picking stocks for the long-term is to invest in what you know. Every industry will have its ups and downs over time, so it’s best to be invested in a sector that you understand. Not only will you set realistic expectations for how your investments perform over the years, you’ll have a keen understanding of the market, trends, competitors and other fundamental contributors to a company’s performance. Not sure where to start? You can also subscribe to an investment newsletter for tips and advice on where to start looking for diversified investments.

How to Pick Stocks for Long-Term Profit

No matter how you pick stocks for long-term investment, remember that time is the key variable. Your investments will have ups and downs over the years, and you’ll need to rebalance your portfolio at regular intervals. That said, picking long-term investments means having confidence in an investment thesis that will weather any market conditions. Investing and holding for the long term allows compound interest to do its thing: accumulate wealth.