(Bloomberg Opinion) -- A day after a stock market rout driven by recession fears, Walmart Inc. issued a second-quarter earnings report that should provide at least a sliver of solace: Consumers have been out in force spending at its big-box stores.

The mega-retailer reported on Thursday that U.S. comparable sales rose 2.8% from a year earlier in the quarter. That growth looks especially robust when considering it comes on top of a 4.5% increase in the same period last year, which was Walmart’s best quarterly comparable sales growth in more than a decade.

Also, despite the looming burden of new tariffs on goods made in China, Walmart has only grown more optimistic about how its 2019 will shape up. The company bumped up its full-year guidance, saying operating income could range from a slight decline to a slight increase, a better result than the “low single digit” decline it had previously forecast. It also expects its U.S. comparable sales growth for the full year to be closer to the upper end of its previous 2.5% to 3% guidance.  

Many facets of Walmart’s business helped fuel growth in the quarter. Its online shopping division held up well, with sales growing 37% from a year ago. Its grocery category, which accounts for more than half of U.S. sales, recorded a “mid-single-digit” comparable sales increase, while its home and toy businesses contributed strong results.

Overall, the report demonstrates that Walmart continues to execute solidly on its efforts to defend itself against Amazon.com Inc.’s incursions. The upbeat showing should not just be received as good news by Walmart investors. It should be a balm for any investor looking for evidence that consumers — at least for now — are plenty willing to spend when given an in-store and digital experience that makes it convenient and enjoyable to do so. 

Walmart’s report is a reminder that investors should resist being too spooked about the state of the consumer based on, for example, the grisly comparable sales decline reported by J.C. Penney Co. Thursday morning or the disappointing quarterly report from Macy’s Inc. a day earlier. Even Macy’s CEO Jeff Gennette acknowledged on a Wednesday conference call with investors that “consumer spending remains healthy” and there is “strong consumer demand for high-quality, affordable fashion.” Macy’s just failed to get a piece of it.

Of course, to put Walmart’s sunnier guidance in context, it’s true the company is uniquely well-positioned to handle gathering trade-related economic storm clouds. As America’s largest retailer, it is in a better stance to negotiate for favorable terms with suppliers than just about anyone else. That means that even if Walmart does have to push up prices, shopping there will still look like a good deal relative to its peers. Plus, in a recession, some shoppers are likely to turn to Walmart to pinch pennies. This kind of consumer behavior helped Walmart hold its own in the last economic downturn.

Walmart has plenty of potential stumbling blocks in front of it. Grocery has been a bulwark of its digital growth strategy, and Amazon appears to be expanding its ambitions in that area, with rapid expansion of grocery delivery from Whole Foods and reported plans to build an entirely new chain. Kroger Co., meanwhile, is set to turbocharge its digital offering through its partnership with Ocado Group Plc. Walmart’s long run of consistently healthy results, though, offer reason to give it the benefit of the doubt in that fight.

To contact the author of this story: Sarah Halzack at shalzack@bloomberg.net

To contact the editor responsible for this story: Daniel Niemi at dniemi1@bloomberg.net

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Sarah Halzack is a Bloomberg Opinion columnist covering the consumer and retail industries. She was previously a national retail reporter for the Washington Post.

©2019 Bloomberg L.P.