Walmart (WMT -0.08%) is one of the bellwethers of the global retail sector. It operates over 10,500 stores and numerous e-commerce sites across 19 countries, and that scale helped it survive the retail apocalypse that wiped out many other big-box retailers.

From its fiscal 2019 to its fiscal 2024 (which ended in January), Walmart's annual revenue rose at a compound annual growth rate (CAGR) of 5% as its EPS grew at a CAGR of 21%. It achieved that steady growth even as the pandemic, supply chain disruptions, and inflationary headwinds rattled the broader retail sector.

Walmart shoppers carry large items back to their car.

Image source: Walmart.

Walmart's stock rallied by 85% over the past five years and delivered a total return of 101% after including reinvested dividends -- but does it still have room to run? Let's review the top arguments for buying, selling, or holding its stock.

The reasons to buy or hold Walmart

The bulls still love Walmart because it's one of the few brick-and-mortar retailers that kept pace with Amazon (NASDAQ: AMZN) and other e-commerce leaders. It achieved that by upgrading its e-commerce and delivery capabilities, using its brick-and-mortar stores to fulfill online orders, and closely matching Amazon's prices.

In its efforts to loosen Amazon Prime's grip on customers, Walmart also expanded its own Walmart+ subscription plan, which offers free deliveries, discounts, and a subscription to streaming service Paramount+. Its planned acquisition of the smart TV maker Vizio could complement that expansion and help it mount an offensive against Amazon's Fire TV set-top boxes and smart TVs.

Furthermore, Walmart kept up with Costco in the warehouse club market with its Sam's Club stores, and it beefed up its overseas e-commerce presence by acquiring India's Flipkart and a stake in China's JD.com. Those bold moves set it apart from its rival Target (NYSE: TGT), which only operates in the U.S. and doesn't own a warehouse club chain.

The bulls expect Walmart to continue growing. In fiscal 2024, its revenue rose 6%, driven by its 5.6% comparable-store sales growth (excluding fuel) in the U.S. and a 13.5% jump in its international sales. By comparison, Target's comps fell 3.7% in its fiscal 2023 (which ended in February), marking its first annual decline in seven years as it grappled with sluggish discretionary spending, theft and safety issues, and a boycott related to some of its Pride Month products.

From fiscal 2024 to fiscal 2026, analysts expect Walmart's revenue to rise at a CAGR of 4% as its EPS grows at a CAGR of 35%. Its stock still looks reasonably valued at 26 times forward earnings, its dividend offers a decent forward yield of 1.4%, and management has raised the payout annually for 51 consecutive years. It has also bought back nearly 40% of its shares over the past two decades.

The reasons to sell Walmart

The bears believe Walmart's stock is historically expensive now  -- it traded at less than 20 times earnings throughout most of the 2010s, and it's pricier than most of its industry peers. Target, for example, trades at just 18 times forward earnings.

The bears will also point out that Walmart's insiders actually sold 86 times as many shares as they bought over the past 12 months. They also sold 64 times as many shares as they bought over the past three months. That chilly insider sentiment strongly suggests its valuations are getting ahead of its growth rates.

Another issue is Walmart's dependence on China. It operates nearly 400 brick-and-mortar stores and multiple e-commerce platforms in China, and its stores in the U.S. and other markets rely heavily on Chinese suppliers for cheap products. Therefore, new trade restrictions and tariffs against China could disrupt its overseas business and squeeze its gross margins.

Lastly, Walmart's expansion of its e-commerce, delivery, and digital media ecosystems to counter Amazon could further squeeze its operating margins. Amazon can rely on its high-margin cloud platform, Amazon Web Services, to subsidize its low-margin retail and digital media businesses. Walmart doesn't have a comparable profit engine.

Its strengths still outweigh its weaknesses

Walmart might face some unpredictable challenges over the next few years, but its scale, diversification, and forward-thinking strategies should help it weather the macro and competitive headwinds. Those strengths -- along with its reputation as a safe-haven investment -- make it a great stock for long-term investors to buy, hold, and forget.