A customer puts a bag of purchases into a shopping cart at a Walmart Store in Los Angeles. Patrick T. Fallon | Bloomberg | Getty Images

The American consumer is back, and so is Walmart, at least for now. Walmart stock surged more than 10 percent after the company reported fiscal second-quarter earnings and sales that beat estimates and the best comparable sales growth in a decade. Sales were boosted by groceries, apparel, seasonal merchandise, and its e-commerce sales popped 40 percent. Walmart's bullish sales report follows a surprise uptick in July retail sales, reported by the government Wednesday. U.S. retail sales jumped a half percent in July, or 6.4 percent annually, after a 0.1 percent dip in June, but that followed solid spending earlier in the spring. The U.S. economy in the second quarter, grew at 4.1 percent, the best pace in four years, and the consumer's strength is a positive omen for third-quarter growth. Walmart, once the undisputed icon of American consumerism, has taken a back seat to Amazon, as its e-commerce business transformed the retail landscape over the last decade, forcing brick-and-mortar stores to adapt or die. Other retailers also had upbeat reports this week, including Home Depot Analysts credited Walmart's success in the latest quarter with its change in online strategy as well as the solid consumer, armed with the proceeds from tax cuts and more confidence overall. Walmart U.S. CEO Greg Foran said the retailer is attracting new customers as it expands online groceries, but also existing customers are adding more to their carts. He said the sales are growing across the country, with no one particular market standing out, a solid foundation for the company's initiatives.

'We have more paychecks'

"There's no question that the consumer is out spending. One of the things we saw in retail sales was even though we don't have more wage growth, we have more wages. We have more paychecks. That critical mass is showing up and actually spending," said Diane Swonk, chief economist at Grant Thornton. "We have very robust spending on discretionary items. They're going out to dinner, and we know the Fourth of July holiday was one of the most traveled on record." Walmart sales at U.S. stores open at least a year rose 4.5 percent, well above the 2.4 percent expected by analysts. Walmart had sales for the quarter ended July 31 of $128 billion, a gain of 3.8 percent. "I think the tax cuts are certainly a factor. You just saw strong economic growth in the quarter. The U.S. economy is doing pretty well, and that's going to be reflected in numbers like Walmart's. It's about time," said Paul Hickey, co-founder of Bespoke. "Walmart is all over the country, it's middle America. I think it's a good representative of the consumer. I think we're seeing U.S. growth has been consistent. We're seeing the employment trend continues to be positive. You're seeing people come back to the workforce, the kind of thing is going to be great for Walmart." Bespoke said the more than 10 percent gap up in Walmart stock early Thursday was the most positive gap open after earnings since at least 2001. The stock previously gapped up more than 5 percent in response to earnings in May 2016 and November, 2017. The stock had gapped down 7 percent in February in its largest decline in reaction to earnings since 2001. Walmart traded slightly positive on the year – up 0.2 percent - Thursday morning, after lagging. That compares with Amazon's 62 percent gain for the year so far. In February, its stock was slammed after it reported a slowdown in e-commerce sales in the fourth quarter. Walmart said its earnings for the full year would reach $4.90 to $5.05, from a prior target of $4.75 to $5. It also said that its investment in Flipkart, an Indian e-commerce company would reduce full-year earnings by 25 to 30 cents per share. Bernstein analyst Brandon Fletcher said it will not be easy to meet that guidance. "It takes a lot of work to get to the adjusted EPS, and we think it's reasonable to assume there are other bad days in [Walmart's] near future as they continue to clean up their int'l portfolio and eCommerce investments," he wrote, in a note. "Grocery and apparel showed strong growth, and costs were under control making it one of the strongest quarters for [Walmart]. While we are excited to see general growth in eCommerce, our small raise in guidance is due to this growth being indicative of a strong economy rather than [Walmart] fixing its core problems."

Missing wage growth