WASHINGTON (Reuters) - Walmart Inc WMT.N raised its annual outlook on Thursday as a robust economy boosted purchases at its stores and website and the retailer picked up market share in food and other groceries, earning praise from U.S. President Donald Trump.

The world’s largest retailer posted better-than-expected earnings, comparable sales and e-commerce growth in its largest market during the third quarter. It has now posted a more than five-year streak of U.S. growth, unmatched by any other retail chain.

Walmart's shares were up 1% in mid-morning trade, and helped lift other retailers, including Target Corp TGT.N and Macy's Inc M.N.

Trump used Walmart’s performance to say U.S. tariffs, imposed by his administration on imports from China, have had little impact on consumers.

“Walmart announces great numbers. No impact from Tariffs (which are contributing $Billions to our Treasury)...,” Trump said in a tweet.

Consumer spending going in to the crucial holiday season remains healthy, Chief Financial Officer Brett Biggs told Reuters in an interview on Thursday. Retailers earn a sizeable chunk of their annual revenue during November and December.

“The consumer remains in pretty good shape, employment situation is good, fuel prices are low … wage growth is pretty good,” he said.

Walmart has also managed to minimize the impact from U.S. tariffs on Chinese imports, Biggs said. “I think we’ve muted the impact (of tariffs) pretty well up to this point.”

The retailer gets 56% of its revenue from food and grocery sales, which allows it to manage the pressure from tariffs better than many rivals, analysts said.

FILE PHOTO: A customer pushes a shopping cart at a Walmart store in Chicago, Illinois, U.S. November 23, 2016. REUTERS/Kamil Krzaczynski

Earlier this week, Trump dangled the prospect of completing an initial trade deal with China “soon,” but offered no new details on negotiations.

In October, Walmart said its chief executive for U.S. operations, Greg Foran, who was credited for turning around the business, will leave the company and be replaced by the head of its Sam’s Club warehouse chain unit, John Furner.

The U.S. business has “a lot of momentum,” Furner, who took charge on Nov. 1, told reporters. His priority is to maintain that pace until the end of the holiday season, he added.

The company is focused on spreading out sales during this year’s compressed holiday season, instead of focusing on a few big days, executives said.

Online sales rose 41%, higher than the previous quarter’s increase of 37 pct and greater than the company’s expectation of 35%.

“Our strength is being driven by food, which is good, but we need even more progress on Walmart.com with general merchandise,” CEO Doug McMillon said in a statement.

Food typically has lower margins and does not drive online profitability, which has continued to suffer for the retailer.

Operating income fell 5.4 percent to $4.7 billion as a result of ongoing investments in e-commerce including faster delivery.

Losses at the U.S. e-commerce business could rise to about $1.7 billion this year from $1.4 billion in 2018, according to estimates from Morgan Stanley.

U.S. e-commerce chief Marc Lore said improving operating profitability is a key area of focus for the company.

Sales at U.S. stores open at least a year rose 3.2%, excluding fuel, in the quarter ended Oct.31. Analysts estimated growth of 2.9%, according to IBES data from Refinitiv.

Adjusted earnings per share increased to $1.16 per share, beating expectations of $1.09 per share.

Walmart forecast earnings per share, including the impact from its acquisition of Indian e-commerce retailer Flipkart, to increase “slightly” from a year ago.

Total revenue rose 2.5 percent to $128 billion.