Despite macroeconomic headwinds that dragged the broader markets down into bear market territory in 2022 (and many individual stocks down even further), some investors still found reasons to be optimistic. For instance, shareholders in several popular companies saw their shares grow exponentially through stock splits this year. While stock splits have no actual impact on the intrinsic value of a business, they can give share prices a boost by making a stock affordable to a wider range of potential investors.

Another reason for optimism is that some great companies saw stock price drops that made those stocks bargains. That attracted long-term investors with available cash to begin buying up stock selectively. Select hedge fund managers got in on this act in the second quarter.

Chris Hohn of TCI Fund Management added to his firm's position in Alphabet (GOOG 0.60%) (GOOGL 0.57%), a company that completed a 20-for-1 stock split in July. And Jim Simons of Renaissance Technologies started a position for his firm in Shopify (SHOP 1.99%), a company that completed a 10-for-1 split in June. Both Hohn and Simons have a place on the Bloomberg Billionaires Index, so they know a thing or two about building wealth.

Alphabet and Shopify stocks currently trade 32% and 81% off their highs, respectively. Is it time to follow the leads of these hedge fund managers and buy these two stock-split stocks?

1. Alphabet: The parent of Google

Alphabet's Google is the third most-valuable brand in the world, according to Brand Finance. That advantage stems primarily from expertise in search algorithms -- Google holds 92% market share among search engines -- but it also comes from the popularity of its streaming video platform YouTube and cloud productivity suite Google Workspace.

Google has parlayed the popularity of those platforms into a dominant position in the digital advertising market. It captured nearly 29% of digital ad spend last year, and despite mounting competition from the likes of Amazon, Google will still hold more than 27% market share by 2023, according to eMarketer. For context, digital ad spend is expected to grow at 11% per year to reach $876 billion by 2026.

Alphabet is also gaining momentum in cloud computing, due in large part to its leadership in the data cloud market. Google Cloud revenue climbed 36% in the second quarter, and it captured 10% of cloud infrastructure spend worldwide, up from 8% market share in the first quarter. That's particularly exciting because Grand View Research estimates that cloud computing spend will grow at 15.7% annually to surpass $1.5 trillion by 2030.

Fueled by its strong position in two large markets, Alphabet has consistently delivered solid financial results. Over the past year, revenue soared 26% to $278.1 billion, and free cash flow (FCF) climbed 11% to $65.2 billion.

Alphabet has several innovations in the works, many of which could reinforce its dominance in the search market. For instance, the company recently debuted Multisearch, a feature that allows search with both text and images at the same time.

And Google is leaning into its ability to facilitate commerce through a recent partnership with Shopify, which allows creators to connect digital storefronts to YouTube. Google will also allow merchants to submit 3D product images in the near future, making it easier for consumers to visualize those products directly from Google Search.

Currently, shares trade at 5.1 times sales, a discount compared to the three-year average of 6.8. Given Alphabet's solid execution and enormous market opportunity, now is indeed a good time to buy this stock-split company.

2. Shopify: The retail operating system for over 2 million businesses

Shopify makes it easy for merchants to run an omnichannel business. Its software connects physical and digital storefronts -- including online marketplaces, social media networks, and direct-to-consumer (D2C) websites -- allowing merchants to manage sales from a single platform. Shopify also provides services like payment processing and financing, and it's building a fulfillment network across the U.S. that will simplify logistics for merchants and enable two-day delivery for consumers.

The company is a comprehensive tool kit for commerce, and that value proposition has brought more than 2 million merchants to its platform. Shopify is the most popular e-commerce software vendor as measured by market presence, according to G2 Grid, and its platform powered 10.3% of retail e-commerce sales in the U.S. last year, second only to Amazon.

That bodes well. According to eMarketer, retail e-commerce sales in the U.S. will grow at 15% per year to reach $1.6 trillion by 2025, and retail e-commerce sales worldwide will grow at nearly 11% per year to $7.4 trillion by 2025.

As a caveat, Shopify struggled with high inflation and a deceleration in online shopping in the wake of the pandemic. But it continued to gain market share in both physical and digital retail in the U.S. in the first half of 2022, and it still posted decent financial results over the past year. Revenue climbed 30% to $5 billion and FCF clocked in at $59 million. To be clear, FCF declined 88% over the past year as Shopify continued to invest in growth in spite of headwinds, but a positive figure means the business still generates enough cash to sustain those aggressive investments.

Currently, shares trade at 8.4 times sales, a serious bargain compared to the three-year average of 37.1. More broadly, Shopify is a $42 billion company with a multitrillion-dollar market opportunity, meaning this split stock could soar in the coming years. With that in mind, investors should consider buying a few shares today.