Walmart (WMT 1.02%), the world's largest retailer, has been a surprising success story over the last few years. Written off by much of the market in the first half of the decade as a retail has-been, the company's made smart changes, and today it's one of the rare traditional retailers putting up consistent growth.

Though the company has faced steep competition from Amazon and others, Walmart has responded aggressively under the guidance of CEO Doug McMillon, who took the helm in 2014. Its biggest move was its 2016 acquisition of Jet.com, a deal that brought Jet founder Marc Lore in to run the company's U.S. e-commerce operations. Since then, Walmart has made several other e-commerce acquisitions including Bonobos and Modcloth, though Lore has since said the company is done with such acquisitions and plans instead to build such brands itself.

A Walmart truck on the road

Image source: Walmart.

Under Lore, Walmart has seen strong e-commerce yearly growth domestically, often in the 40% range. It has expanded its inventory and shipping network to the point where it can offer free two-day shipping on any purchases of at least $35 on some combination of the millions of items available online. It offers this without a yearly membership fee, a key advantage over Amazon Prime. The company has also boosted e-commerce sales by rapidly expanding its network of grocery pickup stations and its grocery delivery divisions.

Those moves have helped the stock nearly double since it bottomed out in 2015 after announcing it would raise employee wages. Its recent strategy also gives a hint at where the company will be in another five years. Let's take a closer look at what investors can expect the world's biggest retailer to do over the next few years.

Taking the next step in groceries

Walmart has rapidly scaled up its online grocery pickup program, and the company now offers it at more than 2,700 U.S stores out of the nearly 4,800 it operates. By the end of the year, the company plans to offer pickup at 3,100 stores. Following that trajectory of change, Walmart will likely be done with its grocery pickup expansion in the next two or three years.

Similarly, the company is ramping up grocery delivery, which is expected to grow from more than 1,100 U.S. stores as of the end of the second quarter to 1,600 by the end of the year. In other words, over the next five years, the company will likely be done expanding both grocery pickup and delivery expansion in the U.S.

Since grocery pickup and delivery has been such a significant driver of growth, investors and Walmart management need to start asking what comes next for the company if it wants to keep growing its already leading market share in U.S. grocery. In fiscal 2019, Walmart U.S. generated $184.2 billion in sales from grocery (55.5% of its total revenue).

Once it completes its pickup and delivery expansion, the company could invest in faster delivery, better technology, or even an acquisition, much like Target did with Shipt. But it's an important question for the company to answer -- once it has no room left to expand pickup and delivery, that source of growth is likely to dry up and will need to be replaced.

An international mystery

In addition to its push into online grocery and e-commerce, Walmart is also making major changes in its international portfolio. The biggest was its acquisition of a majority stake in Flipkart (India's leading e-commerce company) for $16 billion in early 2018 when Walmart won a bidding war over rival Amazon.

Besides the Flipkart acquisition, Walmart made a number of other big moves. The company sold 80% of its Brazilian operations, effectively divesting from Latin America's largest economy, albeit an often troubled one. Elsewhere in the region, Walmart's $225 million acquisition last year of Cornershop, an online marketplace in Mexico and Chile for delivery from supermarkets, pharmacies, and other such stores, was blocked by regulators, but the move indicates the company's interest in Latin American e-commerce, and it could make a similar move in the coming years.

In the U.K., meanwhile, Walmart's planned merger of its struggling Asda banner with Sainsbury's was also blocked, prompting talk of Walmart's taking Asda public, which would bring in cash the company could redeploy elsewhere. Walmart is likely to unload Asda in one way or another by 2024.

Finally, in China, Walmart sold Yihoadian, its China online marketplace, to JD.com, the country's biggest direct seller, in exchange for a 5% stake in JD and a strategic alliance with the fast-growing Chinese e-commerce company.

All of the above moves point to a cohesive strategy. Walmart is divesting from slow-growth territories where it has struggled (like Brazil and the U.K.), and it is investing in emerging, high-growth markets like India. Expect the company's international portfolio to become more oriented to high-growth markets by 2024, as McMillon recognizes that's where the opportunity lies -- and that Walmart needs to compete for it early on.

Will Lore stay?

The other big question Walmart will answer in the next five years is whether Marc Lore will stay with the company. Lore recently addressed perceived tensions at Recode's CodeCommerce conference between himself in Greg Foran, the head of stores for Walmart U.S. He noted that his push toward innovation and risk-taking in the e-commerce segment sometimes clashes with the company's historically conservative strategy, which puts profits ahead of risk-taking. 

When he sold Jet and signed on with Walmart in 2016, Lore essentially agreed to stay with the retailer for five years, or until 2021. Whether he remains with the company past that agreement should offer a big clue into Walmart's future, as the company will likely have a more conservative and risk-averse approach without him directing its e-commerce operation. After all, Lore's coming to work for Jet was a key part of Walmart's deal to acquire the unprofitable e-commerce start-up. The company sought his leadership for a reason.

Significant momentum and solid growth

Overall, investors should expect Walmart to become more urban, tech-savvy, and focused on e-commerce and international growth markets five years from now. Whether the stock rises in that time will depend on how the company fares against the competition, which won't be easy as Amazon and Costco continue to gain market share.

However, Walmart has significant momentum at this point and should continue to put up solid growth, at least until it completes its online grocery expansion. If Flipkart succeeds in India and it can convince Lore to stay on and lead U.S. e-commerce, the company should find itself in a stronger position five years from now.