While it's not wise for parents to be too obvious about having a favorite child, it's completely OK to have a favorite stock or several. What can earn an equity its golden-child status? It starts with business fundamentals and a strong market position. In looking at my current favorites, I see that I also tend to favor ones that haven't been great performers lately. Granted, this isn't an easy combination of attributes to find, but with an eye on the long term, these two companies qualify. Image source: Getty Images. Amazon Amazon's (NASDAQ: AMZN) stock price has eked out less than a 2% gain this year compared to a nearly 18% increase for the S&P 500. But this comes after an astonishing 76% gain in 2020. That means the stock was due for a correction. However, as its recent results attest, the company remains as strong as ever. In the first half of the year, Amazon's revenues rose by about 35% to $221.6 billion. The company also generates a lot of profit -- its operating income of $16.6 billion in H1 was approximately 69% higher than it was in the prior-year period. It continues to drive online traffic, and it appears poised to have a big holiday season, getting a head start on those sales this year. Guided by its customer-first approach, Amazon isn't merely an online seller offering low prices and fast delivery on just about everything -- which is quite a feat by itself. There's also its popular Amazon Prime subscription service that includes free, fast delivery on items plus a streaming video service. In April, it had 200 million members, 33% higher than the previous year, showing there's more growth ahead. It's this ability to innovate and service the customer that makes Amazon such a formidable company, and a great long-term investment. The pandemic drove more people to shop online. In 2020, online sales grew by nearly 34% to $800 billion, and it's projected to increase to over $900 billion this year, according to one estimate. While physical stores may not go away anytime soon, shopping online is still becoming increasingly popular. And Amazon, as a huge online retailer, is poised to benefit. Nor should investors forget about Amazon Web Services (AWS), its fast-growing cloud computing division. For the first six months of the year, the segment's sales grew by 35% to $28.3 billion. A leader in cloud infrastructure in an increasingly important high-growth area, this business has a lot of potential to keep driving sales and profit increases for a long time. The company is so dominant, it can change the landscape of a sector, such as apparel, when it decides to enter the business. This is called the "Amazon Effect." With its dominant online presence that continues to attract shoppers, a growing physical store base, and AWS' success, Amazon's growth story is far from over. Walmart Walmart's (NYSE: WMT) stock is down by more than 3% in 2021 so far -- a disappointing performance. It does come after the share price rose by over 21% last year, though. This shouldn't deter you from investing in it, though. Undoubtedly, this is just a hiccup for the tremendously successful retailer. It's a little confusing analyzing this year's results. Walmart's revenue rose by 2.6% to $279.4 billion. But it sold businesses in the interim that cost the company $13.1 billion of revenue. Factoring this in, revenue rose by more than 7% year over year. You can see Walmart's enduring strength by looking at same-store sales growth. Its U.S. comps rose by 6.4% in the first half of the year, with the Walmart and Sam's Club divisions both posting growth. At the start of the year, management was lukewarm about its sales and profit prospects, which also held the stock in check. It expected flattish top-line growth and a low-single percentage increase in operating income. Fast forward, management has become more upbeat. For the full year, it expects 6% to 7% sales growth and an 11% to 14% increase in operating income, excluding the sold businesses. Walmart has perfected its low-cost, low-price business over nearly 60 years. And while some retailers failed to invest aggressively in the future, Walmart's management has kept the company moving forward, starting e-commerce initiatives in 2000 and continuing with other technological advances as it developed its omnichannel approach. A year ago, it launched its own subscription loyalty-club service, Walmart+, which offers delivery at no extra charge, discounts on gas, and faster checkouts in its stores. It's not standing pat, either. Walmart plans capital expenditures of $14 billion this year, primarily for things like the supply chain, automation, and customer-facing initiatives. This should allow the company's operations, including online, to run more efficiently, including faster and cheaper shipping. Combined with its ultra-low prices, this puts Walmart in an enviable position to not only remain relevant, but potentially pick up market share from other retailers that can't keep up with its technology commitment. Amazon and Walmart have both become dominant by serving their customers. Each offers low prices and convenience, and they have been rewarded with massive sales and profits. Stocks rarely go straight up, and that's the case with these two. Both took a breather this year, giving investors an opportune moment to assess their prospects. Upon closer examination, both these stocks offer a unique opportunity, which is why they've risen to the top of my list. 10 stocks we like better than AmazonWhen our award-winning analyst team has a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* They just revealed what they believe are the ten best stocks for investors to buy right now... and Amazon wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of September 17, 2021 John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Lawrence Rothman, CFA has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends the following options: long January 2022 $1,920 calls on Amazon and short January 2022 $1,940 calls on Amazon. The Motley Fool has a disclosure policy.Source