Alphabet (GOOGL 0.66%) (GOOG 0.65%) has run like a thoroughbred thus far in 2023, riding the ongoing digital transformation, the accelerating adoption of artificial intelligence (AI), and the more broad-based recovery of technology issues. Share prices of the search leader are up 50% so far this year, roughly five times the 10% gains of the S&P 500. This has been a welcome development for shareholders, who watched as the stock price fell more than 39% in 2022. 

Investor sentiment got a boost from the company's improving financial results, which suggests the rebound in the advertising market may finally be gaining traction. This is crucial for Alphabet going forward, as the sector represents the lion's share of Alphabet's revenue.

What does this mean for investors who sat out Alphabet's current rally? Should they buy with the expectation of future gains or avoid the stock because of its recent run-up and the economic uncertainty that remains? Let's take a look.

A person looking at graphs and data on a see-though computer display.

Image source: Getty Images.

What pushed Alphabet stock lower last year?

Last year was a bit of an outlier in Alphabet's history, as the widespread economic uncertainty pushed the broader market lower. The one-two punch of rampant inflation and rising interest rates weighed on consumer spending, which in turn punished the advertising industry.

History is rife with examples of businesses slashing advertising budgets in times of uncertainty, as marketing can be ramped up or dialed back on short notice without notable consequences. A dearth of discretionary spending by consumers and businesses helped fuel the downward spiral that followed.

This chain of events had a chilling effect on Alphabet's results in 2022, as revenue grew just 10% last year, in stark contrast to its 41% gains in 2021. It spooked some investors who headed for the hills, oblivious to the temporary nature of the situation. A quick look at previous downturns shows that once the economic recovery begins, historic spending trends return, and the demand for digital advertising rebounds.

Despite the bruising downturn, Google retained its title as the worldwide search leader, with 92% of the market, according to data compiled by web traffic analytics provider StatCounter. This, in turn, fueled the digital advertising that makes up the vast majority of Alphabet's revenue. The company was responsible for nearly 30% of worldwide digital ad spending to close out last year, according to online marketing trade publication Digiday. 

While uncertainty remains, it appears a recovery in ad spending has begun. In the second quarter, Alphabet's revenue increased 7% year over year to $74.6 billion, accelerating from a 3% increase in the first quarter. This suggests that, at long last, the advertising market is on the road to recovery -- which could ultimately push Alphabet's stock higher.

Additional drivers abound

The recovery of the ad market isn't the only potential catalyst that could contribute to future gains for the Google parent.

Another prominent growth driver is digital transformation, which is fueling the need for cloud computing. Google Cloud held strong as the third-largest worldwide cloud infrastructure provider, with 9% of the market, trailing Amazon Web Services and Microsoft Azure, which controlled 30% and 26%, respectively, according to data provided by market analytics firm Canalys. 

However, bigger isn't always better. Google Cloud continued to be more nimble than its larger rivals and grew more quickly. The segment increased sales by 31% in the second quarter, outpacing Azure and AWS, which grew revenue by 26% and 12%, respectively. The report cited Google's robust artificial intelligence (AI) infrastructure as a big draw: "Google Cloud's partner ecosystem continues to provide support in the development of its generative AI applications." 

Alphabet isn't resting on its laurels. At the company's 2023 I/O developer conference, Google introduced a laundry list of AI-powered products and features, a strategy that will serve to make its ecosystem stickier.

What to do about Alphabet stock now

Alphabet is currently selling for roughly 28 times trailing earnings, a slight premium to the price-to-earnings (P/E) ratio of 24 for the S&P 500. That isn't unreasonable, particularly since Alphabet is expected to return to double-digit revenue and earnings-per-share growth between now and 2024. Furthermore, AI is still an unknown quantity, which may not be fully factored into analysts' consensus estimates. As the market for generative AI continues to unfold, Alphabet is positioning itself to be one of the principal beneficiaries of the growing demand.

Alphabet stock has a long track record of success, gaining 500% over the past 10 years, more than triple the 150% gains of the S&P 500 despite being hamstrung by the worst downturn in more than a decade.

As I outlined above, Alphabet has several growth drivers that could continue to fuel a rally that could run for months, if not years, though it won't rise in a straight line. However, the company's enduring prospects and its strong history of growth suggest now is the time to buy or add Alphabet shares -- if you haven't already.