Like most Chinese stocks, Tencent Holdings (TCEHY -0.66%) has been on a rough ride in recent years. After its share price reached an all-time high of nearly $100 in 2021, it lost almost three-quarters of its value, and it's still down by more than half.

While its shareholders suffered during that period, contrarian investors can consider its aftermath an opportunity to buy shares of one of the best companies in China for cheap.

Two people at a table smiling as they look at something on one of their smartphones.

Image source: Getty Images.

Tencent's 2022 performance was disappointing

Tencent had been a hallmark of consistent and sustainable growth, with an unbroken track record of growth since it went public in 2004. So when the tech company reported that its revenue and operating profit fell by 1% and 13%, respectively, in 2022, investors would have found it difficult to swallow.

Many factors contributed to that weak performance. One was that the company had become gigantic, generating 555 billion yuan  ($79.6 billion) in revenue in 2022. It is quite natural for a company of that size to find it challenging to sustain high growth rates.

But the bigger culprits were external factors such as China's economic weakness, which was caused in part by that nation's extended and strict COVID lockdowns. Other Chinese government policies also hurt Tencent's financials in 2022. For example, its regulatory crackdowns on the online education and tech industries have severely impacted Tencent's advertising and cloud income.

Besides, in the name of common prosperity, the government has indirectly extracted 100 billion yuan (about $15.5 billion) from Tencent. While the Chinese government's new direction will not directly weaken Tencent's competitive advantage (more on this later), it certainly puts its future profitability at risk. Unfortunately, political risks are unavoidable when investing in Chinese companies.

On a slightly positive note, Tencent has somewhat recovered from its 2022 woes. It delivered respectable first-quarter 2023 results, with revenue and operating profit up by 11% and 9%, so the worst is probably over for the company.

Tencent's prospects remain bright

Tencent's 2022 results might have disappointed its longtime shareholders, but make no mistake. It still owns some of the best businesses in China.

Take its social media networking business, WeChat. With 1.3 billion monthly active users (MAU), its user base includes almost everyone in China. And they use it not only for communication but also to access services such as online payments, ride-sharing, public transportation, entertainment, online gaming, and more. In a way, it's almost impossible for an average Chinese citizen to live in China without using WeChat and its ecosystem of services.

With its dominant market position, Tencent has plenty of opportunities to profit from its captive users. To keep making money from its ecosystem, all it has to do is ensure that it remains the preferred communication platform in China. Fortunately, it is the only game in town, and it could keep that position for a while.

If that's not enough, Tencent has proven to be an excellent tech investor, having bought stakes early on in what have become some of the region's most prominent companies. Pinduoduo, JD.com, Meituan, and Sea are just some examples.

In other words, Tencent has twin engines of internal business and external investments to keep its growth machine humming.

A quick word on valuation

Usually, shares of a company of Tencent's caliber won't come cheap. But this stock -- still down by more than half from its 2021 peak -- is currently trading at a reasonable valuation.

As of writing, Tencent's stock has a price-to-earnings ratio of 16. Its 5-year average ratio is 27. Besides, that existing metric doesn't consider the value of the vast investment portfolio ($117 billion ) the company owns. Adjusting for these investments would result in an even lower price-to-earnings ratio.

In short, investors are not in favor of Tencent stock.

So what it means for the rest of us?

Tencent's recent business performance might not have been inspiring, but the issues that caused it difficulty are likely temporary.

While it would be unrealistic to expect Tencent to keep growing at its prior rates -- given that it is now the 15th-largest public company in the world -- it would not be unreasonable for investors to expect growth to return to respectable rates soon, thanks to the twin engines it has to power it. Moreover, buying the stock at its current valuation poses no significant risk of permanent capital loss.

Patient investors with investing horizons of more than five years should consider buying some shares.