New York (CNN Business) Should I invest in Chinese stocks given the concerns about a trade war with the United States?

The trade kerfuffle clearly should give investors pause when looking at Chinese stocks. But you shouldn't ignore the world's most populous nation and second largest economy.

In fact, China's stock market is holding up just fine so far this year -- despite all the rhetoric from the Trump administration and the new round of tariff increases imposed by the United States and China on one another.

The Shanghai Composite is up 18% this year, better than the Dow and S&P 500 . And this benchmark Chinese index has gained nearly 50% over the past five years -- matching the rise of US stocks over the same period.

There are some industries in China that might hold up well even if there is no quick resolution to the current trade spat.

The rise in purchasing power for middle-class Chinese consumers has created a vibrant retail sector. So American investors might be wise to consider big Chinese brand name companies as part of a diversified portfolio.

Ratings agency Standard & Poor's said in a report Wednesday that the impact of higher tariffs for many of Chinese companies it covers should be "manageable" because these companies focus more on the domestic Chinese market as opposed to exports.

Chinese consumer companies should hold up well

Alibaba BABA Amazon AMZN China's e-commerce companyreported strong results Wednesday as sales and the volume of merchandise on Alibaba's various platforms soared. The stock is now up about 30% this year. That's better than

JD JD Tencent TCEHY Shares of Alibaba rivaland Chinese tech and gaming companyhave surged this year as well.

iShares MSCI China MCHI SPDR S&P China GXC Baidu BIDU China Mobile CHL If you're an average investor looking to buy into the China market, there are several top Chinese ETFs, such as theandfunds, that are each up about 13% year-to-date. Both own Alibaba and Tencent as well as Chinese search companyand telecom

Luckin Coffee LK Starbucks SBUX There are also high hopes for the Wall Street debut of China's-- a competitor to-- later this week on the Nasdaq in the United States.

Jiayin Group JFIN Uber UBER China's financial services sector is booming as well. Shares of Chinese online lending marketplacerose more than 50% in its debut on Wall Street on Friday -- the same day thatshares fell.

Krishna Memani, chief investment officer of OppenheimerFunds, added in a report this week that China's government and central bank will pull out all the stops to keep the Chinese economy from slowing down too much.

That's another reason why Chinese companies that do a big chunk of their business domestically should hold up okay.

"Chinese policy makers, who have been quietly but definitively stimulating their economy, are likely to respond with more fiscal stimulus," Memani said.

US exporters to China could get hit harder

The emergence of the Chinese consumer also makes it less likely that big Chinese firms will suffer dramatically from a trade war. There will be pain, of course. But it won't be so severe as to derail the stocks of most leading Chinese companies.

"The contribution of trade to the economy is relatively low by global standards," said Kim Catechis, portfolio manager at Martin Currie, in a report. "The implication is that while China is undoubtedly hurt by the trade wars, the damage is not catastrophic."

Apple AAPL Boeing BA Caterpillar CAT Conversely, US companies that are doing big business in China stand to lose more because of escalating trade tensions. That's a big reason why Dow stocksandhave been hit hard during this recent bout of market volatility,

JUST WATCHED Trump calls trade war with China 'a little squabble' Replay More Videos ... MUST WATCH Trump calls trade war with China 'a little squabble' 01:25

Deere DE It's also one of the reasons why JP Morgan analyst Ann Duignan downgraded US farm equipment giant, which reports earnings on Friday, to an "underweight" -- which is essentially a sell rating.

In her report this week, Duignan cited Chinese tariffs as one reason why soybean exports to China are expected to plunge. That's bad news for Deere.

But think longer-term.

No investor wants to see the United States and China in a full-blown trade battle. That's why many think the two countries eventually will realize that a drawn-out trade war is not good for either of them or the global economy.

So big Chinese companies seeking to do more business in the United States -- and vice versa -- should be good bets for the next few decades.