The cost-cutting retailer, known for its appeal to cash-strapped families, took a larger share of Americans’ grocery budgets in the quarter to Oct. 31. Three-quarters of those gains came from buyers with annual incomes of more than $100,000. executives told analysts. “Regardless of income levels, families are more price conscious now,” said Doug McMillon, Walmart’s chief executive. Like-for-like domestic sales rose 8.2% excluding fuel during the quarter. This compares with an annual increase in US consumer prices of 7.7% in October, a month in which food price inflation reached 10.9%. Walmart shares rose as much as 7.5 percent to $148.64 in midday trading on Tuesday, boosted by news of a new $20 billion share buyback plan and a better-than-expected 8.7 percent increase in group revenue to 153 billion dollars. McMillon indicated that the company was working through the excess inventory that unpredictable spending patterns had left it with earlier in the year. The retailer had “significantly improved” its inventory position in the quarter, it said in a statement on Tuesday, and would make further progress in the fourth quarter. The more bullish outlook came as Walmart said it would pay $3.1 billion to settle claims by states that it contributed to the U.S. opioid crisis by failing to regulate the prescription of highly addictive painkillers in its stores. Weeks after announcing negotiations for similar settlements with drugstore chains CVS and Walgreens, New York Attorney General Letitia James said such retailers “have played an undeniable role in perpetuating the opioid disaster.” Walmart will be subject to “robust oversight” to prevent fraudulent prescriptions in the future, he noted. Unlike CVS and Walgreens, which will split nearly $10 billion in payments between them over 10 to 15 years, lawyers involved in the settlement said Walmart will pay the “vast majority” within a year of the deal. The settlement led Walmart to report a net loss of $1.77 billion for the quarter, or a loss of 66 cents per share. Excluding opioid payments and losses on equity investments, adjusted earnings were $1.50 per share, above the Wall Street consensus of $1.32 per share. Recommended The company expects net sales growth to slow to 3 percent in the fourth quarter, partly due to currency fluctuations, with comparable U.S. sales down 3 percent and adjusted earnings per share down 3 percent to 5 percent. However, that would leave it on track to beat its previous forecasts for full-year sales and profit growth. “The consumer is stressed,” said John David Rainey, Walmart’s chief financial officer, saying the company was planning on the assumption that consumer spending could slow further, particularly in general merchandise. Adjusted earnings per share for the full year are now expected to fall 6 to 7 percent, instead of 9 to 11 percent as forecast three months ago. Additional reporting by Jamie Smyth in New York