Chinese search giant Baidu (NASDAQ:BIDU) went public in 2005. After stumbling out of the IPO gate, it experienced the type of run-up that can create dynastic wealth for patient investors. Between early 2006 and mid-2011, shares of the company advanced 3,000%. In other words, in just five years, you could have turned a $10,000 investment into $300,000!

But since then, the stock has been a chronic underperformer. Since 2011, shares of Baidu have returned 66%. That's not bad, but the broader market has spanked it, returning over 100% during the same time frame. 

Shanghai at sunset

Is the sun setting, or rising on Baidu's opportunities in China and beyond? Image source: Getty Images.

First, it was upstart Qihoo gaining search market share from Baidu. Then, it was an expensive foray into an online-to-offline (O2O) business model that has had modest results. After that, the Chinese government cracked down hard on advertising practices after the death of a student using the services of a Baidu advertiser. 

But -- finally -- things seemed to be looking up for investors. Baidu successfully spun out its iQiyi (NASDAQ:IQ) streaming video subsidiary, and a focus on artificial intelligence (AI) has captured investor attention. Shares of the company had doubled since early 2016. Then, the stock dropped again last week, this time by 10% on the news of AI specialist and COO Qi Lu's departure from that role.

It's all enough to make a long-term investor -- I've held shares for over six years -- wonder: Is Baidu even a buy anymore?

Taking the long view

Before even diving into that question, though, it's important to calibrate ourselves. While I briefly went over the company's stumbles of the past five years, an investment is only important insomuch as how it performs moving forward.

Of course, since we have yet to discover a fully functional crystal ball, we can't predict the future with any level of certainty. That being said, there are lots of ways to evaluate the competitive landscape in China, where Baidu is positioned in that landscape, how well-prepared the company is to take on adversity, and how expensive the stock is.

Where does Baidu sit in the Chinese technology landscape?

Baidu is hardly the big kid on the block in China anymore. While it is valued at about $90 billion, Alibaba (NYSE:BABA) and Tencent (NASDAQOTH:TCEHY) both clock in at roughly $500 billion. They have different core businesses, with Baidu focused on search, Alibaba operating the largest e-commerce platform, and Tencent home to the most popular social media app (WeChat) and video games.

But the avenues that all three are looking to exploit for growth -- AI, mobile payment systems, O2O -- overlap greatly. Therefore, any investment in one of these three needs to be made with an eye on what the other two are doing.

As far as Baidu is concerned, digital advertising -- offered through and using data from the company's search engine, app, mobile assistant and other tools -- still makes up the bulk of revenue. Last year, it brought in $11.2 billion in ad revenue -- 86% of all revenue for the company. On that front, it's worth noting that while Baidu has a commanding 82% of the Chinese mobile search market, Alibaba's Shenma comes in at 12%, according to Statcounter. Maintaining that lead is paramount to an investment in Baidu. Without it, the value proposition that powers Baidu's ad business could evaporate.

The other 14% of revenue last year came from a combination of services that are primarily driven by the iQiyi entertainment streaming subsidiary. As I mentioned above, Baidu spun out iQiyi earlier in the year, but has retained a 58.5% stake in the company, and controls 93.3% of voting rights. In other words, Baidu definitely still controls iQiyi. Given iQiyi's current market cap of $14 billion, Baidu's stake is worth about $7.5 billion today. 

On this front, it's important to point out that this isn't a winner-take-all industry. Just as American consumers have found room for subscriptions to NetflixAmazon's Prime Streaming, and Hulu all at the same time, there's little reason to believe that iQiyi -- which is free with advertising and costs about $3 per month to eliminate ads -- can't coexist with Tencent Video and/or Alibaba's Youku Todou. 

The biggest competitive concern that investors seem to be focused on now is the brain drain from the AI department's roster. When Qi Lu came on board in 2016, it was hailed as a huge hire. Though he is not officially leaving the company -- he is staying on as vice chairman of the board -- his exit leaves a hole. It comes on the heels of renowned AI expert Dr. Andrew Ng leaving the company last year. 

While these AI initiatives themselves might not be producing revenue yet, they are crucial to the future of Baidu fulfilling its mission of "providing the best and most equitable way for people to find what they're looking for." A simple Internet search has typically been how this was done, but moving forward, virtual assistants, autonomous driving, and other AI initiatives will be helping to fulfill this mission. 

How strong is the balance sheet?

We can't predict what level of involvement Qi Lu will maintain with Baidu's AI efforts, or if the team he assembled has the chops to produce on its own. What we can evaluate, however, is Baidu's financial statements. If it wants to keep pace with the Alibabas and Tencents of the world, it will need the cash on hand to invest in the future. 

On that front, the company is strong.

Company Cash Debt Free Cash Flow
Baidu $26.6 billion $6.9 billion $4.5 billion
Tencent $72.3 billion $21.6 billion $13.0 billion
Alibaba $60.8 billioin $18.7 $9.2 billion

Data sources: SEC filings, Yahoo! Finance, and company IR sites. Cash includes long and short-term investments. Free cash flow presented on trailing-12-month basis. 

While Baidu's war chest may be smaller than its peers, there's nothing to be too ashamed of with what Baidu has. With a net cash position of almost $20 billion and very strong free cash flow, Baidu should be able to fund its AI-related endeavors to keep pace with these rivals. 

How much are you paying for shares of Baidu?

While I don't like to spend too much time haggling over price, it's worth investigating just how expensive shares of Baidu are. After last week's dive, the stock now trades for just under 20 times free cash flow, and about 23 times trailing earnings (after backing out stock-based compensation). 

While that's not in the "screaming buy" territory, it is a very reasonable price given the types of valuations we see in the technology space in general.

How I'm approaching Baidu shares

Given this reasonable valuation, I think there's a margin of safety for investors who want to start a position in a stock that gives them exposure to China. While it will be important to keep an eye on the company's search market share and its stop-and-start efforts in AI, concerns on these fronts are largely priced into the stock. If you buy now, you'll be getting the potential of iQiyi wrapped up in your investment as well.

While I don't plan on buying shares now, that's only because I already own them, and they account for 4% of my real-life holdings.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool’s board of directors. Brian Stoffel owns shares of AMZN, Baidu, NFLX, and Tencent Holdings. The Motley Fool owns shares of and recommends AMZN, Baidu, NFLX, and Tencent Holdings. The Motley Fool recommends iQiyi. The Motley Fool has a disclosure policy.