What happened

Shares of Alphabet (GOOGL 0.23%) (GOOG 0.23%) turned higher Friday, gaining 3% as of 12:48 p.m. ET.

While slowing inflation data no doubt helped boost the shares, a couple of specific catalysts sent the tech giant higher. Evidence continued to emerge that the historic dry spell that has plagued digital advertising was abating, and the company got a huge vote of confidence regarding its approach to artificial intelligence (AI).

So what

Streaming video pioneer Roku reported second-quarter results after the market close on Thursday, and the results seemed to confirm that the historic dry spell that has plagued advertisers may be over.

The company, which makes the bulk of its revenue from the digital advertising shown on its platform, grew revenue to $847 million, up 11% year over year and 14% sequentially. This marked the company's best showing in a year and suggests the marketing dry spell may finally be lifting. This built on the results released earlier this week by adtech companies Alphabet and Meta Platforms and provides the clearest sign yet that the advertising market may have finally turned the corner from its downturn-induced drubbing.

Another catalyst was a note from Oppenheimer analyst Timothy Horan. The analyst cites a Carnegie Mellon research paper that detailed a method used to trick the large language models (LLMs) used by generative AI into providing "undesirable or inappropriate responses," according to a report by The Fly. While this might sound like bad news, the analyst goes on to say that the news validates the approach advocated by Alphabet "on being responsible in releasing powerful bleeding-edge LLMs into the wild," according to the report.

Now what

Alphabet has enjoyed a stunning recovery this year, with the stock up more than 50% as of this writing, though it's still 11% off its peak. It isn't the screaming bargain it was just months ago, but it's still historically cheap, selling for 5 times next year's sales.

The continuing recovery of the digital advertising market and the company's long history with AI suggest that now is the time to buy Alphabet stock.