Walmart (WMT 1.32%) stock was a rare winner for investors this past year. Shares were in positive territory by mid-December compared to a 16% slump for the S&P 500. The retailer's returns look even better when you factor in its dividend payment, which is about to pass a huge milestone.

With that backdrop in mind, let's take a look at the prospects for the business and that growing dividend over the next few years.

Higher sales are bucking the trend

Unlike many other businesses that saw impressive growth during the pandemic followed by a slump, Walmart appears to be holding onto those gains. Revenue rose 9% year over year in the most recent quarter, thanks to a balance between rising customer traffic and higher spending. Compare that result to the 3% increase that rival Target recently posted, and it makes sense that Walmart stock would be outperforming today.

Shoppers are currently focused on prices, and that plays right into the retailing giant's core strength. Its massive sales footprint allows it to keep prices low, which bodes well for its sales trends through what could become a recession.

More diversity in Walmart's revenue streams

Walmart is also likely to be a more diverse business in a few years. The company's push into more tech niches like digital advertising isn't making a huge impact today. But that shift, plus expansion into areas like fintech, will likely account for a significant portion of annual revenue in a few years. By then, the digital advertising market could be in another upswing.

But the best part about owning Walmart's stock is that as a shareholder, you don't have to worry about any single revenue stream. The retailer boasts an extremely diverse sales footprint, as opposed to more focused retailers like Target and e-commerce specialists like Wayfair.

Higher dividend payments

There's almost no mystery around whether Walmart will be paying a higher dividend in three years. This past February, the company raised that payout for the 49th consecutive year. The next increase, in early 2023, is set to mark number 50, which will usher the retailer into the exclusive club of Dividend Kings.

That streak highlights another great reason to like Walmart's stock: predictability. Sure, the consumer staples giant isn't likely to post double-digit sales growth in any given year. Its profit margins are closer to 3% as well, while some software giants turn more than 40% of sales into operating profit.

But you can count on Walmart to steadily expand revenue and earnings over any multiyear period, even one that includes a consumer spending pullback. That fact helps explain why the company could afford to raise its dividend through all of the recessions and economic disruptions over the past 50 years.

The stock's performance over the next several years might depend on where we are in the economic expansion cycle. Tech stocks tend to lead the market out of recession periods, while a retailer like Walmart becomes less attractive as growth accelerates. But investors should look past those short-term factors and focus on the characteristics like diversity and dividend income that have made this a winning stock through a wide range of selling environments.