The U.S.-China trade war has been playing hell with the economy generally. Chinese manufacturing has been slowing down and our own policy makers are looking at ways to goose our economy, including interest rate and tax cuts, observes Ian Wyatt, editor of Million Dollar Portfolio.

But somebody forgot to tell Alibaba Group (BABA). Its fiscal first-quarter report showed GAAP earnings per share were $1.17, beating analyst estimates by $0.23. Alibaba’s revenue shot up 36.9% to $16.74 billion, beating expectations by $880 million.

Judging by their second-quarter performance, American companies have been feeling the trade war’s pinch. Alibaba, on the other hand, is doing fine, even though American analysts expected it to have a slower quarter.

Why? It holds a 58.2% share of its home e-commerce market, insulating it from the effects of the trade war. And just as you and I are still buying our toilet paper, tchotchkes and all the items we need for daily living from Amazon, the Chinese are doing the same thing from Alibaba.

The only difference is that their stuff is mostly made in their country. That means Chinese consumers are not feeling the pinch American consumers are, so they’re still spending relatively freely. It also helps that the Chinese government has expanded the list of duty-free products, to help offset the impacts of tariffs.

Alibaba has also been eating some of the costs, which you would expect to drag revenue down. The company’s cost of sales has gone up, but that act of generosity has also encouraged Chinese consumers to shop on its platforms, producing a net gain on earnings. Annual active customers rose 20 million in the quarter to 674 million, while 34 million mobile users were added in the quarter.

Alibaba has also posted impressive growth in less-developed areas of China. While we’ve debated the value and wisdom of expanding broadband internet access into more rural areas of America, the Chinese have been doing just that.

More than 70% of Alibaba’s new users came from “less developed areas,” show the value the Chinese government’s internet expansion efforts are creating for Chinese companies. But even as its share price has risen after the beat, Alibaba is hardly overvalued. It’s currently trading at just 7.8 times earnings and its price-to-earnings growth ratio is 1.

That’s by no means expensive considering the valuations America’s FANG stocks have been fetching. If anything, it’s surprising that Alibaba isn’t more richly valued.

That’s especially true since Alibaba has pulled a play from Amazon (AMZN), expanding beyond just ecommerce into cloud computing, logistics and, honestly, a little bit of everything. Like Amazon, that makes Alibaba a bit tough to value, but it’s also made the business incredibly resilient.

At this point, I would wager that Alibaba is roughly 15% undervalued compared to its global peers, especially since its global peers don’t have such a huge home market to tap into. It also doesn’t hurt that China’s government is helping to shield Alibaba for tariffs, even as it works to expand Alibaba’s home market.

Subscribe to Million Dollar Portfolio here …