With a total return of 299% over the past 10 years, the Nasdaq Composite Index has had a great run. But faced with high inflation, rising interest rates, and general pessimism among investors, the tech-heavy index lost 33% of its value last year. Everyone is hoping things turn around for the better this year.

Amid the Nasdaq bear market, astute investors are finding lucrative opportunities out there. Without a doubt, Alphabet (GOOGL -1.82%) (GOOG -1.80%) is one of them. Here are three reasons to buy the tech giant in 2023.

1. Dominating a huge market

It probably comes as a surprise to absolutely no one that Alphabet generates the bulk of its revenue -- 79% in the third quarter of 2022 -- from ads. To be specific, Google Search is the crown jewel of Alphabet; it alone accounted for 57% of total sales in the latest quarter.

The advertising market is cyclical because corporations both big and small can quickly pare back their ad spending to conserve cash when times are tough. This is exactly what Alphabet has been dealing with. Its ad revenue increased by just 2.5% in the third quarter last year compared to growth of 32.6% in the full year of 2021.

What's more, the management team, led by CEO Sundar Pichai, recently decided to lay off 12,000 employees, or 6% of the headcount, following similar moves made by its big-tech peers. This could be a sign that things will get worse before they get better.

Nonetheless, Google is still incredibly powerful as a gateway to the internet. As more activity happens online, with more users and attention going to mobile devices in particular, it's easy to be confident in the company's prospects. In fact, a total addressable digital ad market that is estimated to reach $700 billion in 2023 presents a ton of growth opportunity for Google's bread and butter.

2. Budding business segments

Besides Google's dominance in search and its consequent lead in the digital ad market, investors need to know about two other valuable areas of the business. The first is YouTube. The video-sharing platform generates ad revenue that's in the same ballpark as streaming giant Netflix's total revenue. And this doesn't include paid subscriptions for YouTube Premium or YouTube TV.

YouTube is becoming a formidable streaming option for consumers. Starting this fall, Alphabet will pay $2 billion annually over the next seven years for the rights to NFL Sunday Ticket. And earlier this month, YouTube announced that it would launch a hub to host free ad-supported channels that pits it directly against the Roku Channel and other similar offerings.

Another burgeoning segment is Google Cloud Platform (GCP), Alphabet's answer to the two leaders in the cloud computing market, Amazon Web Services and Microsoft Azure. As enterprises transition their tech infrastructures from on-site to on-demand setups, GCP should have no trouble quickly increasing its revenue, which was up 37.6% year over year in the most recent quarter.

While Google Search undoubtedly deserves the spotlight when investors look at the Alphabet empire today, in the future, YouTube and GCP will become even more important to the company's success.

3. An extremely attractive valuation

Over the past decade, Alphabet's stock has climbed 416%, handily outpacing the Nasdaq in the same period. But with macro headwinds bothering the business, shares ended 2022 down 39%. Now, they trade at a price-to-earnings ratio (P/E) of just 17.5. This is the lowest P/E valuation since 2014.

As of September 30, Alphabet had $116 billion in cash, cash equivalents, and marketable securities on its balance sheet, most of which the business doesn't need to handle day-to-day operations. If investors were to subtract some of the excess liquidity from the company's market cap, the valuation would look even more attractive.

A bear market can definitely turn even the most optimistic investors into pessimists. But it's always best to look past the near-term headwinds and toward a company's long-term outlook. Right now is a fantastic time to take advantage of Alphabet's valuation and buy the stock. It could boost your portfolio returns in 2023 and beyond.