Alphabet (GOOGL 5.53%) (GOOG 5.46%) stock posted another day of gains in Wednesday's trading despite a retreat for the broader market. The company's share price closed out the daily session up 1.2%, according to data from S&P Global Market Intelligence. Meanwhile, the S&P 500 index ended the session down 1.5%.

Alphabet's share price gained ground thanks to a promising report about the company's artificial intelligence (AI) and digital advertising strategy. The stock had been up as much as 3.7% in the day's trading, but it retreated in conjunction with the broader market following some potentially worrying news related to China and Taiwan.

Why did Alphabet climb as the market fell?

A new report from The Information suggests that Alphabet is on track to restructure its digital-advertising sales unit. The move will likely result in the company making greater use of AI tools.

Alphabet generates the large majority of its revenue from digital advertising sales, and it employs approximately 30,000 people in its ad sales unit. With the company potentially leaning more on artificial intelligence technologies, it could further reduce its workforce on the heels of layoffs that have already taken place over the last couple of years. In turn, this could bolster the company's already impressive margins.

The report about a potential restructuring for the company's ad unit had Alphabet stock posting strong momentum early in today's trading, but shares lost some ground as news that Chinese President Xi Jinping had recently told U.S. President Joe Biden that his country plans to reintegrate Taiwan into its territorial holdings took center stage. Taiwan is the epicenter of global semiconductor production, and a potential move from China to exert more control over the country could threaten the stock market's recent bullish momentum.

Is Alphabet stock a buy right now?

Thanks to its impressive ecosystem of products and services and access to massive troves of valuable data, Alphabet has a strong position in the AI race. For long-term investors, the stock continues to look like a worthwhile portfolio addition.

GOOGL PE Ratio (Forward 1y) Chart

GOOGL P/E Ratio (Forward 1y) data by YCharts.

Trading at roughly 21 times next year's expected profits, Alphabet still looks reasonably valued for a company that has plenty of room for continued earnings growth over the long haul. Today's news about the China-Taiwan situation highlights the fact that there are factors that could derail the tech giant's impressive bull run in the short term, but there's a good chance that investors who take a buy-and-hold approach with the stock will be able to score market-beating returns.