In tough times, investors tend to look to Walmart (WMT 0.57%) to deliver.

The retailer, which is known for its economies of scale and everyday low prices, has long been seen as a recession-proof business. After all, more than half of the company's revenue comes from groceries, which consumers need to buy in good times and bad. 

Possibly for that reason, Walmart has outperformed the market in recent months. But will that momentum last? To answer that question, we asked a bull and a bear to weigh in on the stock. First, the bull case.

A Walmart sign lit up at night.

Image source: Walmart.

Taking the fight to Amazon

Jeremy Bowman: Walmart has made a lot of improvements in recent years, including adding grocery pickup stations to thousands of stores, rolling out its Walmart+ membership subscription, building up its marketplace and advertising business, selling off underperforming international businesses, and improving operations at Sam's Club.

Those efforts have paid off as the company has delivered steady comparable sales growth, gaining market share along the way and transforming into a modern omnichannel retailer.

There's also evidence that Walmart is putting pressure on Amazon like never before. The e-commerce giant recently announced that it would raise its order minimum on grocery delivery from $35 to $150, essentially ceding the massive market to Walmart after years of trying to gain traction in grocery. Additionally, Amazon is starting to charge some customers to return orders at UPS stores.

Both of those moves show that Amazon is moving away from its traditional strategy of subsidizing losses in order to gain market share, which should open the door for Walmart to gain more market share and potentially grow margins, especially as it moves into areas Amazon has traditionally dominated, such as its third-party e-commerce marketplace.

It's true that Walmart is facing similar challenges to other retailers, including elevated inventories and weak sales of discretionary items like electronics. While that and the broader economic environment could impact the company's performance this year, Walmart hasn't been in a stronger competitive position in a long time.  

It might not be the best time to buy Walmart stock

Parkev Tatevosian: My bear case for Walmart centers on the adjustment from the pandemic-era operating environment. The company thrived during the early stages of the outbreak as it was deemed an essential retailer, while many other businesses were forced to shut their doors temporarily. As economic reopening gains momentum, though, consumers are looking forward to spending time away from home.

WMT Inventories (Quarterly) Chart

WMT Inventories (Quarterly) data by YCharts

This rapidly changing consumer behavior caught Walmart off guard. Indeed, as of Jan. 31, Walmart had inventories of $56.6 billion. That is considerably higher than the company would like to have. To make matters worse, Walmart's competitors also have too much inventory. Why is that bad news for investors?

To return inventory to desirable levels, industry participants must offer discounts and promotions, which could bring down profit margins. Walmart's operating profit margin fell to 3.4% in its most recent quarter. That was down from 3.9% in the same quarter in the prior year. And there is no certainty about how much further discounting will be needed.

WMT PE Ratio Chart

WMT PE Ratio data by YCharts

Finally, Walmart's stock is selling at a price-to-earnings ratio of 35, which is roughly the average value it has traded for in the last couple of years. Given the elevated risks from changing consumer behavior and industry-wide inventory glut, I would prefer to buy Walmart stock at a lower price than it is currently selling for today.