The past several months haven't been kind to investors in Chinese stocks. The ongoing economic saber-rattling between Washington and Beijing has created an atmosphere of worry that's weighing on companies from the Middle Kingdom. Even Baidu (BIDU 0.43%), China's search leader, hasn't been immune. Though the company crushed earnings expectations last quarter, the combination of trade tensions and the possibility of Alphabet's Google search unit reentering the Chinese market have helped sink its share price. Baidu stock has lost nearly a third of its value since it peaked in mid-May.

The company reports on its third quarter after the market close on Oct 30, and shareholders are hoping that strong results will be enough to pull the stock out of its slump . Let's take a look at the company's results from last quarter and see if they provide any context for the future.

Baidu's Silicon Valley AI Lab.

Baidu's Silicon Valley AI Lab. Image source: Baidu.

A strong showing

For the second quarter, Baidu reported revenue of $3.93 billion, an increase of 32% year over year, which surpassed analysts' consensus estimate and landed at the high end of management's guidance. The bottom line was similarly robust, with adjusted earnings per share of $3.18, significantly higher than the $2.44 expected by analysts. 

In Q2, Baidu delivered on all the metrics that count. Online advertising sales increased 25% year over year, while the number of its digital marketing customers grew 9% to more than 511,000. The company not only added new advertisers, but its customers spent more, as revenue per customer grew 16% to $6,200.

Baidu's recently spun-off streaming service iQiyi (IQ 1.09%) added $932 million in revenue to Baidu's coffers, a 51% increase over the prior-year period. Content costs grew to $788 million, up 68% year over year, as the company continued to invest in programming for the subsidiary. Baidu still owns a controlling stake in iQiyi, so it will continue to have an impact on its parent's results.

The search giant has been divesting itself of a number of businesses outside its core operations so it can focus its resources on search and a variety of artificial intelligence (AI) technologies, including voice control, real-time translation, facial recognition, and self-driving cars.

Escalating trade tensions had already knocked the stock down somewhat from its May highs by the time Baidu reported in late July. The sell-off intensified when rumors surfaced that Google was planning to bring a version of its search product back to mainland China, in a move that would challenge Baidu's dominance in what was a fairly captive ad market.

Alphabet has since confirmed that it's testing a censored version of its Google search that could eventually go online in China, if given the go-ahead by officials in Beijing. The company still must deal with protests about the move from its employees, and criticism from Congress about the plan, which some have described as unethical. 

A hand holding a permit in front of a car and driver.

Baidu received permits to test self-driving cars in Beijing. Image source: Baidu.

What the quarter could hold

For Q3, Baidu has forecast revenue of between 27.37 billion yuan and 28.77 billion yuan, (between $3.94 billion and $4.15 billion at current exchange rates), which would represent year-over-year growth of between 23% and 30% in local currency. It's in the process of selling off a number of non-core businesses -- excluding those from the results, it's anticipating revenue in a range of 26.56 billion yuan to 27.92 billion yuan ($3.83 billion to $4.02 billion), or year-over-year growth of between 26% and 33%.

Analysts' consensus estimates call for revenue of $4 billion, up 18% year over year (in dollars), and for earnings per share of $2.43, a decline of 35%.

While the potential for increased competition and global affairs to drag on its Baidu's business certainly bear watching, investors will eventually have to return their focus to the company's performance -- which lately has been just fine.