Alibaba (BABA 0.09%) and Baidu (BIDU 1.24%) are two of the largest tech companies in China. Alibaba owns the country's largest e-commerce marketplaces and its top cloud infrastructure platform. Baidu owns the country's largest online search engine.

I compared these two tech giants back in April and declared Baidu was a better buy because it faced fewer regulatory headwinds, had a lower valuation, and its core advertising business was gradually recovering. But both stocks have burned investors since I wrote that article: Baidu's stock price has declined about 30%, while Alibaba's stock price has tumbled nearly 50%.

A person uses a smartphone in the city at night.

Image source: Getty Images.

Let's see why investors dumped Alibaba and Baidu over the past eight months, and if either battered stock has a shot at recovering next year.

China's tech crackdown

China's crackdown on its top tech companies over the past year caused many investors to sell all of their Chinese tech stocks.

That crackdown included a record antitrust fine against Alibaba in April, smaller fines against other tech companies (including Baidu) for unapproved investments and acquisitions, a ban on most for-profit education platforms, a temporary suspension of new video game approvals, tighter video game playtime restrictions for minors, and new data privacy restrictions for popular mobile apps and services.

China also seems to be pressuring its top tech companies to delist their U.S. shares and relist their shares in Hong Kong. At the same time, U.S. regulators are considering delisting shares of Chinese companies that don't comply with tighter auditing standards. All those challenges have made it very difficult to invest in Chinese tech leaders like Alibaba and Baidu.

Alibaba's flaws are becoming more visible

Alibaba generates most of its revenue and all of its profits from its commerce business, which hosts its Chinese online marketplaces, its overseas online marketplaces, its brick-and-mortar stores, and its Cainiao logistics subsidiary.

The commerce segment's year-over-year revenue growth has decelerated over the past two quarters, mainly due to difficult comparisons against the pandemic, tough competition from rivals like JD.com and Pinduoduo, and new government-imposed restrictions on its exclusive deals with merchants and algorithm-driven pricing strategies.

The commerce segment's margins are also declining, due to its growing dependence on lower-margin businesses (brick-and-mortar stores, cross-border commerce, and Cainiao) to boost its sales.

That pressure could make it harder for Alibaba to support the growth of its unprofitable cloud, digital media, and innovation initiatives segments over the long term. Alibaba's cloud business could also struggle to maintain its double-digit sales growth as China enforces its new data privacy rules.

Back in May, Alibaba expected its revenue to rise 30% in fiscal 2022, which ends next March. It reiterated that target in August. But in November, it abruptly slashed that forecast to just 20%-23% growth, citing tougher challenges ahead for its commerce business. Analysts expect its earnings to decline 16% for the full year as its margins continue to contract.

Baidu faces similar problems

Baidu generates most of its revenue from its online marketing business, which sells search ads, display ads, and managed business pages. This core business struggled before and throughout the pandemic as it faced tougher competition in China's saturated advertising market.

Baidu's online marketing revenue fell year over year for seven straight straight quarters before finally returning to growth over the past three quarters. But at the same time, Baidu relied more heavily on expanding its unprofitable cloud business -- which ranks a distant fourth place in China's cloud infrastructure market (according to Canalys) -- to grow its revenue.

Baidu also still owns iQiyi (IQ 0.72%), an unprofitable streaming video platform that has become a dead weight on its bottom-line growth. Baidu previously relied on iQiyi's revenue as its ad business slowed down, but iQiyi's top-line growth has been anemic over the past year. 

Therefore, Baidu faces a similar problem as Alibaba: It's still dependent on revenue from its lower-margin businesses (especially its cloud segment) to offset the slower growth of its higher-margin online marketing business. That dynamic could gradually make it harder for Baidu to support the expansion of its newer AI and driverless vehicle platforms.

Baidu expects its revenue to rise 14%-17% in fiscal 2021, which aligns with the calendar year. However, analysts expect its earnings to decline 17% as it relies more heavily on its lower-margin businesses. Baidu also expects China's regulatory crackdown to throttle its near-term advertising growth.

Which stock is the better investment?

Alibaba and Baidu both look cheap at just 16 times forward earnings. However, they're cheap for obvious reasons: Both companies face tough regulatory headwinds, and they're both struggling with unbalanced growth.

I personally wouldn't touch either stock until the regulatory headwinds wane. If that happens, I'd be more bullish on Alibaba, since it will remain China's top e-commerce and cloud company for the foreseeable future. Baidu won't fade away anytime soon, but it still feels much more like a legacy player compared to higher-growth advertising platforms like Bilibili or Tencent's WeChat.