Some argue that from a technical standpoint, the S&P 500 is in a bull market. (On June 8, the index was more than 20% up from its most recent low at closing.) Whether the bull market is officially here or not, investors shouldn't miss this chance to recoup the losses they incurred last year -- and then some.

One way to do that is to buy shares of companies likely to deliver outsized returns through the bull market and beyond. Here are two examples: Alphabet (GOOG 9.96%) (GOOGL 10.22%) and Roku (ROKU -10.29%). Let's find out why these stocks are great buys. 

An identical headwind

Alphabet and Roku make the lion's share of their money from advertising. Alphabet does so through Google, the leading search engine in the world, and YouTube, one of the most popular websites worldwide.

Roku allows its customers to stream content from dozens of platforms, including the most popular ones. The company's ecosystem is a prime target for advertisers.

The recent economic problems forced advertisers to decrease their budgets, leading to lower advertising revenue for Alphabet and Roku. Revenue growth was substantially down for these corporations over the past year and a half. 

GOOGL Revenue (Quarterly YoY Growth) Chart

GOOGL revenue (quarterly YoY growth) data by YCharts; YoY = year over year.

Notice, though, the slight rebound for both in their latest updates. That could be a sign of things to come.

Advertising is bouncing back

The amount of money that companies spend on advertising tends to fluctuate to the rhythm of economic cycles. That means after the challenging environment Alphabet and Roku faced last year, things should start picking up as the economy improves.

And again, we are seeing signs of that already. Roku's second-quarter earnings impressed investors. The streaming specialist saw its top line jump 11% year over year to $847 million.

There were other positive signs for Roku. It continues to expand its ecosystem, which now has 73.5 million active accounts, an increase of 16% year over year. Streaming hours of 25.1 billion also jumped by 21% compared to the year-ago period.

Alphabet also delivered an upbeat quarterly update. Total revenue of $74.6 billion was about 7% higher than the year-ago period. YouTube and Google advertising both saw slight increases, while the company's cloud unit was once again one of the best performers, at least in terms of revenue growth. Google Cloud's revenue of about $8 billion soared by 28% year over year, much faster than the company's overall business.

This segment also turned in operating income of $395 million after recording a loss of $590 million in the year-ago period. Google's advertising business remains the largest, but the company's cloud unit could be the most exciting.

Long-term growth opportunities 

In the short run, Alphabet and Roku will benefit from a stronger economy and stock market. Both companies have performed exceptionally well since the year started, and investors should expect that to continue through the next 12 months, at least if the advertising market sustains its recent upward trend. That's why these two tech giants are great stocks for this bull market.

But they are also excellent stocks to hold well beyond the next year as both seek to tap into lucrative long-term opportunities. For Alphabet, cloud computing is somewhere near the top. Few companies beat Alphabet in this industry in terms of market share -- it is third only behind its eternal rivals, Amazon and Microsoft.

It's difficult to tell whether it will ever overtake either, but that's not the most important thing. Cloud computing has a bright future, given its advantages to businesses. No company wants to maintain the expensive (and frankly outdated) infrastructure necessary to meet its own computing needs. Enter the cloud, helping companies cut costs and expenses related to physical data storage (and the personnel to handle it), with tailored on-demand services.

On top of its existing leadership in the industry, Alphabet generates plenty of money to continue investing in it. The company had $21.8 billion in free cash flow at the end of the second quarter. Google Cloud hasn't been profitable on an operating basis for very long. It first hit that milestone in the first quarter, a great sign of progress for Alphabet.

The company has other growth avenues, from artificial intelligence to YouTube streaming. 

Roku's long-term prospects also look attractive. Streaming has gained steam at the expense of cable because viewers can stream on multiple devices and whenever they want, and more cheaply than traditional television. The switch is far from having peaked; in May, streaming made up 36.4% of television viewing time.

That's in the U.S., where the industry enjoys high penetration. Roku's expanding ecosystem and hours of viewing will only attract more advertising dollars over the long run, fueling the company's growth for a while.

Here's the bottom line: While Alphabet and Roku are enjoying impressive runs this year, that could be only the beginning for investors who buy their shares today and hold them through the next five years or more.