Walmart (WMT -0.08%) initially built its success on revolutionizing small-town retailing and its IT-driven supply chain. However, as its initial strategy ran its course, it became better known for paying low wages and squeezing suppliers than for offering a compelling retail experience.

In recent years, a pivot into e-commerce and offerings such as digital advertising and subscription services seemed to improve Walmart's prospects and arguably made it a proxy for the S&P 500. Unfortunately, these improvements may not make its stock a buy today. Here's why.

Walmart's rebound

Despite the stock's past struggles, Walmart has finally learned to leverage e-commerce to its advantage. It acquired Flipkart in 2018, a major e-retailer in India, giving it some degree of success internationally. This is critical, as many of its attempts to compete internationally as a brick-and-mortar retailer ended with embarrassing failures.

Walmart's move into e-commerce domestically seems to have succeeded. As a result, e-commerce has become the fastest-growing part of its business. Moreover, e-commerce plays a role in turning its market saturation in the U.S. to its advantage. About 90% of the U.S. population lives within 10 miles of a Walmart, leaving little room for additional in-store sales growth. However, this proximity to customers helped Walmart to build a competitive advantage through omnichannel retailing, allowing it to combine in-store and e-retailing to offer a superior customer experience.

Additionally, entering the e-commerce business allowed it to copy Amazon with respect to digital advertising and a similar subscription service, Walmart+. This reinvigorated domestic growth in the U.S., which remains its largest market in terms of net sales.

Where that has left Walmart shareholders

Unfortunately, these improvements have still left new investors with few reasons to buy. Over the past five years, Walmart stock has provided about a 100% total return to investors, closely matching the S&P 500.

WMT Total Return Level Chart

WMT Total Return Level data by YCharts

Concerning the dividend, Walmart pays shareholders $0.84 per share annually, following the 3-for-1 stock split in February. This amounts to a dividend yield of 1.4%, a level close to the S&P 500.

Nonetheless, the S&P 500 gives investors the diversification that comes from holding about 500 stocks. Although Walmart is a stable business offering market-matching returns, buying its stock leaves shareholders dependent on one management team participating in just a few industries. Thus, it brings higher risks for comparable returns, leaving new buyers less incentive to choose it over the S&P 500.

Admittedly, some current shareholders may fare better, particularly long-term investors and those who bought when the stock had struggled. A $1,000 investment in its August 1972 debut on the New York Stock Exchange would leave an investor with around $2.6 million today, a massive return an index would struggle to surpass.

Also, even those who have not held it that long have benefited from its dividend growth. Walmart paid its first dividend in 1974 and has hiked the payout yearly since that time. Hence, if one earns a double-digit (or higher) dividend yield from their original investment in the Dividend King, it makes sense to stay in the stock.

Investing in Walmart stock

Ultimately, Walmart looks like a solid stock to hold. Steady increases and rising dividend yields have brought significant returns, especially if one has held the stock for decades.

However, its current dividend yield and total returns match the S&P 500. Unfortunately, such returns do not compensate investors for the added risks of owning an individual stock, leaving investors with little incentive to deploy new capital in Walmart stock.