Last year was a difficult one for Baidu (NASDAQ:BIDU) investors, with a trifecta of issues hitting the Chinese internet search leader, driving its stock down as much as 40% at one point in the year. Increasing competition, a struggling economy in China, and the trade war with the U.S. weighed on the stock for much of 2019.

Things started looking up toward year-end, however, as Baidu returned to growth. Excluding divested business segments, revenue grew by 3% year over year in the third quarter, helping the stock recoup half of its losses to close out 2019 down about 20%. 

Baidu has started the year on a high note, as two announcements related to its artificial intelligence (AI) program and one related a long-awaited trade agreement sent the stock soaring nearly 8% on the first day of trading in 2020.

A fleet of self-driving cars in a convoy on a freeway

Baidu's Apollo self-driving car program is gearing up. Image source: Baidu.

1. Autonomous cars "driving" the stock

Word emerged on Tuesday that Baidu had been granted a license to test its Apollo driverless cars in Beijing, one of the most traffic-congested cities in the country. Baidu was issued 40 licenses to test its self-driving cars while carrying passengers on specially designated roads around China's capital city -- making it the first Chinese company to do so. 

The company also announced its self-driving cars had traversed more than 3 million kilometers (about 1.8 million miles) across 23 cities in China to date, adding more than 1 million kilometers and 10 additional cities to its tally since July. Baidu has been granted a total of 120 permits across China, by far the most of any autonomous driving system in the country. 

2. Beating the competition in an AI language test

While Alphabet's (NASDAQ:GOOGL) (NASDAQ:GOOG) Google and Microsoft (NASDAQ:MSFT) have been battling for bragging rights in the realm of AI, Baidu has surprised both by winning a competition that tests the ability of AI-based algorithms to understand human language. 

Baidu recorded the record-breaking score of 90.1 on the General Language Understanding Evaluation (GLUE), which is widely regarded as the key benchmark for AI language understanding. The company's ERNIE [Enhanced Representation through kNowledge IntEgration] model beat out both Microsoft and Google, which achieved scores of 89.9 and 89.7, respectively. Baidu became one of only 10 AI systems thus far that have been able to surpass the human understanding baseline score of 87.1 and the first to ever top a score of 90. 

3. A cooling of trade tensions

President Donald Trump announced the long-awaited signing of a trade deal with China on Tuesday, with the event scheduled in Washington, D.C., for Jan. 15. The first part of the deal, titled "phase one," marks a significant turning point in a trade war that has raged for more than 18 months. Trump recently halted new tariffs that were scheduled to go into effect in December, while removing some levies that had already been placed on a wide range of goods manufactured in China.

The ongoing trade war has dented China's economy, as the country's gross domestic product grew by just 6.2% in the second half of 2019, marking its slowest rate of growth in more than 25 years. This has hurt China stocks and helped pinch Baidu's results, which caused the company to report a loss in the first quarter, its first since debuting on U.S. markets in August 2005. An easing of the trade war will undoubtedly help boost China's declining growth rate -- and improve Baidu's fortunes in the process.  

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.