Stock investing starts with picking the right companies. Remember, finding the next meme stock before the price takes off and selling at the high point is virtually impossible without a time machine.

Instead, I like buying shares in high-quality companies with strong market positions that have competitive advantages that aren't easily duplicated. Granted, this is easier said than done, but these companies fit the description.

Three people have a conversation while holding papers with graphs on them.

Image source: Getty Images.

1. Amazon

Amazon (NASDAQ:AMZN) has become synonymous with e-commerce, but the company is much more than that. It has done this by sticking to its principles, which include focusing on the customer, innovating, and planning for the long term. You can see this through its popular Amazon Prime subscription service, which includes delivery charges, and hardware devices like Alexa and Kindle. There is also its fast-growing, higher-margin Amazon Web Services (AWS) business that provides cloud computing services.

Its presence is so dominant that Amazon completely changes an industry's dynamics when it decides to enter the fray. That's because it often provides cheap prices and fast delivery -- a compelling proposition. This happened when it pushed further into selling food and apparel, for instance. The company is also moving further into offering prescription drugs.

While its long-term focus means Amazon is willing to forgo short-term profits, the company is hugely profitable. Its operating profit grew from 2016's $4.2 billion to $22.9 billion last year. In the first quarter, the company's profit more than doubled from $4 billion to $8.8 billion.

2. Costco

Costco Wholesale (NASDAQ:COST) has created quite a shopping experience. Known for its wide aisles, bulk items, and free samples, it has built a loyal and growing membership.

Costco's simple formula is hard to replicate: It focuses on high-quality merchandise and services, and sells them at low unit prices. Costco's paid members have grown from 47.6 million in 2016 to 58.1 million last year (the fiscal year ends on June 30). Meanwhile, its retention rate has hovered around 90%.

With a focus on customer needs, it even has a generous return policy to help members have confidence in their purchases.

Management also keeps an eye on improving results. It has had positive same-store sales (comps) for many years, including a 9% increase last year after excluding the effects of gasoline price changes and foreign currency exchange translation. Operating income grew from $3.7 billion to $5.4 billion over the last five years.

Recent results also provide encouragement that management continues to execute. Comps increased by 15.2% for the first three quarters of 2021, and operating income grew by more than 26% to $4.4 billion.

While income investors can find higher yields than Costco's 0.8%, it does have a history of annually raising dividends. This includes increasing May's payment to $0.79 from the previous quarter's $0.70. But better still, the board of directors has declared large special dividends every few years. The most recent was a $10 payment last December.

3. Walmart

Walmart (NYSE:WMT) has built itself into the world's largest retailer, serving more than 240 million customers every week. The company, which opened its first discount store nearly six decades ago, squeezes costs and passes these savings on to the customer. This allows Walmart to offer the lowest prices on its goods, making it difficult for competitors to keep up.

It isn't sitting still, either. It is keeping pace with online competitors, namely Amazon, by investing in technology to provide a seamless omnichannel experience to its shoppers. This includes launching the subscription service Walmart+, which provides delivery, gasoline discounts, and faster checkout at its stores.

Last year, its adjusted revenue rose by 7.7% to $564.2 billion, driving operating income 9.3% higher to $23.4 billion. In the first quarter, revenue growth was about 2%, and management expects a low-single-digit percentage increase for the year. Its guidance calls for flattish operating income.

While this outlook undoubtedly disappointed some investors, I'm not concerned. Management has its eyes on the long-term picture, and it is investing in technology to better serve its customers and remain a dominant retailer.

Walmart also offers a 1.6% yield, and it has also raised its quarterly dividend annually since initiating a payout in 1974. Already a Dividend Aristocrat, it will become a Dividend King when the streak hits 50 years.

While these are three different companies in various stages, each is a strong addition to your portfolio. Adding them will give you a high-growth stock, a steady grower that tends to pay large dividends every few years, and a dominant retailer that continues to grow and regularly increase payments to shareholders.

That's a winning combination that should make these core holdings a great addition to your portfolio.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.