What happened

Shares of Chinese internet stocks Alibaba (BABA 2.92%), Tencent Music Entertainment (TME 1.70%), and Huya (HUYA 4.06%) rallied this week, up 19.1%, 35.1%, and 23.9%, respectively, through Thursday trading.

All three companies reported third-quarter earnings this week. While Alibaba slightly missed revenue expectations, all three companies beat profit expectations and were able to maintain positive profitability, despite the economic slowdown in China. The newfound cost discipline, a stark contrast from the big U.S. tech stocks that are spending more freely, was welcomed by investors.

In addition, Chinese authorities unveiled reforms aimed at stabilizing the ailing property sector, and others anticipated a relaxation of COVID-19 restrictions.

So what

It should be noted that all three of these stocks were down significantly over the past few years. Even after this week's big moves, from their all-time highs, Alibaba is down 75%, Tencent Music Entertainment is down 82%, and Huya is down 94%.

With the Chinese economy reeling from the country's crackdown on technology companies, its harsh "zero-COVID" restrictions, and the decline in its massive property sector, there was a pretty low bar set for these stocks. Therefore, the fact that each of these companies had at least some positives within their otherwise lukewarm results was rewarded.

Alibaba grew revenue just 3% in the quarter, but its non-GAAP (adjusted) earnings before interest, taxes, and amortization grew 29% year over year, thanks to cost controls and cuts.

While Tencent Music saw declines in revenue, monthly active users, and online karaoke or "social entertainment" users, management's focus on paid users enabled the company to increase its paid subscriptions by 19.8% to 85.3 million users. And thanks to cost controls, net income actually increased 38.7%.

Meanwhile, Huya had a more difficult time, as revenue, paying users, and profit declined from a year ago; however, even Huya posted some silver linings, as total monthly active users for Huya Live grew, and both revenue and earnings came in ahead of lowly expectations.

These better-than-feared numbers combined with some new optimism over the broader Chinese economy to start the week. Last Sunday, Chinese authorities unveiled 16 measures aimed at supporting the country's property sector. Chinese property developers have gotten in trouble over the past year-plus, as authorities sought to pop the massive bubble in the real estate sector that had developed over many years. However, some are now fearing the contagion may spread to the nation's banking system in a more substantial way, as well as to even healthier property developers. Therefore, to see the government step in with a package estimated to total $184 billion was encouraging.

Now what

Better-than-feared earnings, the real estate rescue package, and the potential for China to loosen some of its COVID-19 policies helped these stocks gain traction, at least through Thursday.

Going forward, investors in Chinese stocks will have to weigh the higher risks of investing in the country versus their low valuations and the potential for some incremental improvement.

If the property sector decline is contained, the country eventually relaxes "zero-COVID" in total next year, and if the relationship between China and the U.S. improves, these stocks could continue rallying. However, that's a lot of ifs, so investors should invest in Chinese stocks carefully, at an allocation that makes sense for your risk tolerance.