If you've been concentrating on U.S. stocks, you may not have noticed the walloping Chinese tech stocks have taken lately. Just look at the China internet-focused exchange-traded fund KraneShares CSI China Internet ETF (KWEB -1.39%), which is down a shocking 36.3% from its all-time highs set back in February.

KWEB Chart

KWEB data by YCharts.

To give you a sense of how much of a drop that is, it's a slightly bigger drop than the S&P 500 saw in the COVID-19 crash of February-March 2020!

This may be highly surprising to some, especially since we're in a global recovery from the COVID-19 pandemic at the moment. However, Chinese technology stocks, following an early-year surge, are now squarely in the sights of the Chinese Communist Party, which is cracking down hard on the country's surging technology sector.

High uncertainty and extreme fear seem to be taking over investors in Chinese stocks, who appear to be taking a "sell now, ask questions later" approach. Yet for those with a long-term orientation, the current extreme pessimism could be a golden opportunity to either initiate or increase exposure to the best Chinese tech stocks.

While I lean more toward this being a good opportunity, there are also some big risks you'll need to take into account when investing in China.

A man in a suit recoils at his tablet sitting outside.

Image source: Getty Images.

What's happening in Beijing?

Set off by retaliation against Alibaba (BABA -1.19%) founder Jack Ma's comments last Fall ahead of Ant Financial's (now scrapped) initial public offering (IPO), Chinese regulators have embarked on a wide-ranging crackdown on Chinese tech companies, with countermeasures ranging from anti-monopoly penalties to data-privacy investigations to new rules regarding overseas listings. Here are a few examples.

Alibaba not only saw its Ant Financial IPO canceled by government authorities, but also received a $2.8 billion fine for forcing brands into exclusivity contracts in exchange for access to its leading e-commerce platform. And in recent days, Chinese authorities also brought the hammer down on Didi Global (DIDI 0.22%) just days after its U.S. IPO, restricting new downloads of the app, essentially preventing the company from adding new users (though existing users can still continue using the service). Ditto for other newly public Chinese companies Full Truck Alliance, a digital trucking and freight platform, and Kanzhun Limited, an online platform that connects job seekers with employers. For what it's worth, I pointed out these regulatory risks for Didi ahead of its listing last month.

The reasons for the crackdown given by Chinese authorities center around data privacy, especially in light of disclosures now required of Chinese companies listing in the U.S. And on Wednesday, July 7, it was reported that China was considering closing the loophole that allows Chinese companies to raise money overseas via variable interest entities located in the Cayman Islands.

It's unclear if that regulation would actually go through and if it did, if it would apply only to new listings or also retroactively to companies that have already listed in the U.S.

What investors should do: Weigh the big opportunities and big risks in tandem

Given that China has four times the population of the U.S., a growing middle class, and a very advanced technology sector, it may seem like the current sell-off is a golden opportunity. After all, many leading tech stocks are now cheaper than their U.S. brethren, despite the fact that they have potentially larger addressable markets and growth prospects.

Furthermore, China has been through various "waves" of government regulation before, such as the anticorruption campaign launched a decade ago. Chinese stocks also took a huge hit at the onset of the trade war in 2018, but then eventually went on to make new all-time highs. So there's a decent chance this sell-off in Chinese stocks, like the others in recent years, will turn out to be a golden buying opportunity.

KWEB Chart

KWEB data by YCharts.

On the other hand, for U.S. investors, there are some big risks. Some may own shares of Chinese companies listed in Hong Kong, but many U.S. investors own variable interest entities (VIEs) registered in the Cayman Islands and directly listed on U.S. stock exchanges. Though a company may be listed in the United States, U.S. investors don't actually own shares of the underlying company, but rather a VIE that's entitled to an economic interest in that company through a contractual agreement. Those contracts seem fairly safe, but when the Communist Party gets involved, it may be enough to disallow these VIE contracts and therefore force the selling of U.S.-listed Chinese stocks.

Other investors also may own Chinese companies via American Depositary Receipts (ADRs), which basically allow American investors to own internationally listed shares of foreign companies held by a U.S. broker or bank. If U.S.-Chinese tensions result in sanctions or bans on owning certain types of companies, those banks or brokers may cease their ADR programs out of fear of being subject to penalties.

My own feeling is that things won't go that far, especially for the large, consumer-facing and internationally focused tech behemoths such as Alibaba or Tencent. After all, if China wants to be a bigger player on the world stage, it won't win many fans by essentially stealing billions from foreign investors.

If you don't own any Chinese tech stocks, now actually may be a great time to scoop up some of the highest-quality, best-run Chinese tech names on the cheap. After all, Warren Buffett partner Charlie Munger did just that recently.

However, investors also can't ignore the worst-case scenario of ADRs being cancelled or something going wrong with the VIE loophole. Therefore, investors should only invest the portion of their portfolios that are allocated to high risk equities. That could be 1% or 2% percent of your holdings or as much as 10% to 20% for younger investors.

In any case, interested investors should keep their eyes open as these fast-moving developments unfold.