Walmart set a high bar for other U.S. merchants by posting strong second-quarter sales and boosting its full-year outlook — even with the Trump administration escalating its trade war with China. The shares rose as much as 7% on Thursday, the most intraday since last August.

Comparable sales excluding fuel for Walmart stores in the U.S. rose 2.8% in the period, beating analysts’ estimates. Primarily driving the result was a higher average ticket, or how much each shopper spent, and market share gains in food, wellness items and toys.

The results were “very solid,” said Chuck Grom, an analyst at Gordon Haskett Research Advisors. The same-store sales and higher guidance “reinforced our view that Walmart is a good investment on a standalone basis, but also offers a safe haven today amid a significant amount of market, consumer and retail uncertainty.”

One of the big questions heading into the results was how the trade war would impact the world’s largest retailer. But Walmart brushed off the concerns by giving more optimistic guidance on comparable sales and earnings per share.

Walmart’s results, along with economic data released Thursday that showed stronger-than-expected U.S. retail sales in July, helped calm fears that the country is headed into recession, with equity indexes rebounding from Wednesday’s rout. Walmart’s earnings also provided a counterpoint to more dismal sales figures from Macy’s Inc. and J.C. Penney Co., showing their struggles may have more to do with their inability to adapt to changing consumer preferences than with a slowdown in demand.

The company has used its scale to minimize price increases, while reducing price tags in areas like food, Chief Financial Officer Brett Biggs said. Overall, inflation at Walmart has been “pretty benign,” he added.


“We’ve protected our consumers really well,” Biggs said in an interview.

The company now sees comparable sales at the higher end of its previous 2.5% to 3% range, while earnings per share could now either increase or decrease slightly this year, compared with an earlier expectation of a low single-digit decline when including the impact of its Flipkart transaction.

The company has maintained its ability to gain traction with consumers because of higher wages and training for associates and efforts to minimize price increases with its scale, according to Jennifer Bartashus, an analyst for Bloomberg Intelligence. The chain is also better insulated from the trade war than many competitors because food, which mostly comes from North America, makes up a larger percentage of its sales, she said.

“By all indications, Walmart is on pace for a strong full year,” Bartashus said.

Powered by online grocery and next-day delivery, web sales in the U.S. rose 37% — slightly ahead of the company’s expected growth rate for the full year. Walmart has been streamlining its digital business to stem ongoing losses in the division in the U.S. It has merged into its main operations and is said to be exploring a sale of women’s fashion site ModCloth. Walmart wants to get leaner as it battles Amazon, Target and Best Buy for shoppers in the upcoming holiday season.

The shares had climbed 14% this year through Wednesday’s close, just ahead of the gain in the benchmark S&P 500 Index.