Amid trade wars, negative yield curves in the bond market and recent mass shootings in two of its stores, Walmart delivered strong second-quarter results.

According to Thursday’s (Aug. 15) earnings release, adjusted earnings per share were $1.27, better than Wall Street’s $1.22 consensus, but still 2 cents lower than the year-ago period.

Net profits for the quarter ending July 31 totaled $3.61 billion on revenue of $130.377 billion, up 1.8% from a year ago. For the first half of fiscal 2020, Walmart’s revenue is $254.3 billion, up 1.4% from the prior year.

Operating income for Walmart U.S. was $4.659 billion, up 4% from the previous year. Sam’s Club improved its operating income to $480 million, up 19.4% from a year ago. The international segment’s operating income was $893 million, down 29.6%, primarily from the divestiture of Brazil and the acquisition of Flipkart, whose results are now part of Walmart’s results.

Comp sales, the key metric by which retailer performance is measured, were 2.8% at Walmart U.S., which were better than expected.

“Comps accelerated sequentially on a two-year stacked basis to 7.3%, which is the strongest growth in more than 10 years,” President and CEO Doug McMillon said. “We’re gaining market share in key categories, including food, consumables, health & wellness and toys. We leveraged operating expenses by 29 basis points and operating income grew 4% marking the fifth consecutive quarter of growth.”

Walmart’s e-commerce business grew sales by 37%, also better than expected as the retailer reported strong sales on the same day as Amazon’s big Prime Day, and a “meaningful contribution” from Walmart’s pickup grocery, the company noted in its prepared remarks.

“Our ability to deliver experiences that leverage our unique set of assets is paying off,” McMillon said. “For the quarter, nine of 10 markets posted positive comp sales. Our customers’ economic health remains solid and our competitive position is strong.”

Investors responded favorably to the solid retail results, sending Walmart shares (NYSE: WMT) up more than 5% at the opening bell on Thursday. Shares traded around $111.90, up $5.70 in heavy volume in the early morning session.

Michael Lassiter, a retail analyst with UBS Securities, said Walmart is managing through a difficult environment. He said the U.S. consumer is in good shape and that is evident in Walmart’s results.

“Walmart is a winner in retail,” Lassiter said. “There will be many who show weakness but for now Walmart looks as if they’ve got this.”

Bank of America analysts agreed consumer spending is strong and that’s a good sign for retailers with a value proposition.

Jim Cramer, a CNBC contributor, said Thursday that Walmart is responsible for a lack of inflation in the country with its low price guarantees.

“Walmart had a great quarter. Their ‘everyday low price’ strategy is a winner,” Cramer said.

To the naysayers, Cramer said, “Walmart’s numbers are more informed than anything we get from the U.S. government and the strong quarter is a sign of consumer strength.”

Walmart also raised its full-year guidance for comp sales to be near the 3% range, up from a wider range of 2.5% to 3%. Brett Biggs, the company’s executive vice president and chief financial officer, told the media Walmart felt comfortable raising the guidance based on the solid results in the first half of the year and perceived impact from pending tariffs on imports from China. He said the company has gone through the recent lists of impacted items and to the best of their ability have guided to include the impact.

DOMESTIC STRENGTH

Walmart U.S. is the core of the retail giant’s business profits and the Supercenter remains Walmart’s cash cow.

“The U.S. Supercenter is a clear competitive advantage and we’re finding new ways to leverage that important asset,” Biggs said. “We’re also operating more efficiently and removing costs in ways that benefit shareholders while serving customers. We’ll continue to leverage our scale, unique assets and financial strength to position the company competitively while driving profitability and creating shareholder value.”

Walmart said strong grocery sales, including growth in private brands, helped to boost the U.S. comp sales number. Biggs said having stores close to customers is a competitive advantage the company is leveraging, to provide convenience through grocery pickup and delivery, pickup towers, and the in-home delivery test that will launch this fall.

Walmart has more than 2,700 stores that offer free grocery pickup and more than 1,100 stores that offer same-day grocery delivery. That has the company on pace to reach year-end goals of 1,600 same-day grocery delivery stores and 3,100 stores with grocery pickup.

Sam’s Club also showed progress in the quarter behind a 2.8% in membership income and 35% uptick in e-commerce sales. Sam’s Club comp sales growth was 1.2%, excluding fuel and 4.2% excluding fuel and tobacco. Sam’s Club total sales were $15 billion, up 1.8% from a year ago.

INTERNATIONAL SPOTLIGHT

Nine of the retailer’s 10 international markets had positive comp sales in the quarter, with strength from Mexico and China and weakness in Canada and the United Kingdom.

Walmart International sales were $29.5 billion, after a $1.3 billion ding from currency fluctuations. The Flipkart purchase is still weighing down profits in the segment, but McMillon said he’s impressed with the ecosystem building through Flipkart.

“Flipkart is impressive and consists of a collection of strong businesses,” McMillon said.

He said Myntra, a leading online fashion company owned by Flipkart, recently concluded its largest four-day sales event of the year. More than two million customers shopped during the event with 7,000 plus orders per minute at peak.

To help fulfill the orders, the Flipkart team partnered with almost 11,000 local Kirana stores to support last-mile delivery. The Kirana partner network helped deliver approximately 70% of the 8.5 million packages that were fulfilled during the event.

Flipkart also recently launched its co-branded credit card, which has received positive initial feedback from customers. Also, the Indian digital payments platform PhonePe recently crossed the milestone of two billion transactions, with 50 million monthly active users, McMillon said.

GUN CONTROL

Each of the Walmart executives who spoke to the media Thursday opened their comments with their sorrow about the recent shootings that took place in Walmart stores in Southaven, Miss., and El Paso, Texas.

“Those tragic and painful events will be with us forever, and our hearts go out to the families that were impacted,” McMillon said in his opening remarks.

He also outlined some steps Walmart has already taken to strengthen its processes to provide a safer environment.

Stopped selling handguns in every state but Alaska in the mid90s.

Stopped selling military-style rifles such as the AR-15 in 2015.

Raised the age limit to purchase a firearm or ammunition to 21 in 2018.

Only selling a firearm after receiving a “green light” on a background check, while federal law only requires the absence of a “red light” after three business days. No longer selling a firearm until receiving a “green light” regardless of the time period.

Videotaping the point of sale for firearms, only allowing certain associates to sell firearms, and securing firearms in a locking case with individual locks, among other measures.

“We’ve attempted to take common-sense steps that allow us to serve customers and create a safer environment,” McMillon said. “We estimate that we represent about 2% of the market for firearms today, which we believe places us outside at least the top three sellers in the industry. We estimate we have about a 20% share of ammunition.”

McMillon said Walmart does not sell military-style rifles and the company believes reauthorization of the assault weapons ban should be debated to determine its effectiveness in keeping weapons made for war out of the hands of mass murderers.

“We must also do more to understand the root causes that lead to this type of violent behavior,” McMillon said.

Greg Foran, president and CEO of Walmart U.S., told the media he also made the trip to El Paso and visited with all 20 stores in that city, including the El Cielo store where the mass shooting took place. Foran said he’s met with as many workers in that market as possible and he’s encouraged by their resilience. He said workers impacted from the shooting have been moved to other stores and the company continues to pour out assistance as needed for the employees and families dealing with the tragedies.

Foran said Walmart has also stepped up security following the incidents and it continues to work with law enforcement in various areas around the country in a proactive manner.

Walmart’s complete second-quarter results and supporting documents can be viewed at this link.