The S&P 500 spent the better part of the past two years in bear market territory, but the index is up more than 20% from its October low, meaning it has crossed the threshold that some see as the beginning of another bull market. Other investors disagree. They say the S&P 500 must reach new all-time highs before the bear market officially ends, and the index is still down 8% from those levels. 

The exact timing of the switch is of little real consequence to most investors. History says the S&P 500 will hit new highs at some point, and that means many stocks will soar in the future, especially as the economy regains its momentum. Investors can prepare for that inevitable outcome by purchasing shares of solid businesses like Shopify (SHOP 1.11%) and MercadoLibre (MELI 3.09%). Let's look at why these two growth stocks are buy-and-hold candidates.

1. Shopify

Shopify is a turnkey solution for omnichannel commerce. Its platform allows merchants to manage sales across physical and digital stores from a single dashboard. That includes online marketplaces like Amazon, social media like Instagram by Meta Platforms, and direct-to-consumer websites. Shopify also provides adjacent services for financing, payments, and logistics, as well as tools that simplify money management, taxes, and cross-border commerce.

Shopify stands apart in terms of the flexibility and support it offers merchants, and it has naturally become the gold standard in e-commerce software for small and medium-sized businesses. But the company is also gaining traction with larger brands. Shopify Plus -- a more sophisticated platform engineered for enterprises -- is the most popular omnichannel commerce software on the market, according to research company G2.

Shopify struggled with economic headwinds last year. Revenue growth slowed as inflation hurt consumer spending, and profitability vanished as costs continued to climb, especially those associated with the buildout of its logistics business. But Shopify has since corrected course by selling its logistics business to Flexport, and its financial performance improved in the first quarter. Revenue increased 25% to $1.5 billion and the company reported a profit under generally accepted accounting principles (GAAP) of $0.05 per share, up from a loss of $1.17 per share in the prior year.

And Shopify is well-positioned to maintain or even accelerate its momentum. Sellers still have access to logistics services through Flexport, but Shopify no longer bears the costly burden of maintaining the underlying infrastructure. That means it can once again focus on its core competency: building software that simplifies commerce for sellers of all sizes.

Retail e-commerce sales are expected to grow by 14% annually through 2030, and wholesale e-commerce sales are expected to grow by 20% annually over the same period. Those tailwinds portend strong growth for Shopify through the end of the decade, and they make its current valuation of 14 times sales look reasonable. Investors should buy a small position in this growth stock (maybe 1% of their portfolio).

2. MercadoLibre

MercadoLibre operates the largest online commerce and payments ecosystem in Latin America, a region where swiftly expanding internet access is fueling strong growth in the digital economy. The MercadoLibre marketplace receives nearly 4 times as many visits as the closest competitor, and its fintech subsidiary, Mercado Pago, is the third most popular digital wallet in the region.

MercadoLibre has fortified its strong market presence with adjacent services. It offers logistics, financing, and digital advertising solutions to merchants, and it provides loans, credit cards, and asset management tools to consumers. Those value-added services make its marketplace and fintech platform even stickier.

The company reported impressive financial results in the first quarter, especially in the context of a difficult economic climate. Revenue climbed 35% to $3 billion as commerce take rate (revenue as a percentage of gross merchandise volume) expanded 1 full percentage point due to increased merchant adoption of logistics and adtech solutions. On the bottom line, GAAP profit skyrocketed 205% to $3.97 per diluted share. That accelerated growth arises from margin expansion, which itself was brought on by more efficient shipping and marketing operations and better risk management in its credit business.

Retail e-commerce sales and digital payments volume in Latin America are expected to grow at 14% and 15% annually, respectively, through 2027. Few (if any) companies are better positioned to benefit from those tailwinds than MercadoLibre. But the company should also benefit from the proliferation of digital advertising. MercadoLibre is building a complete adtech platform, and its investments seem to be paying off. It reported ad revenue growth of 62% in the first quarter.

Currently, shares trade at 5.4 times sales, an absolute bargain compared to the three-year average of 11.7 times sales. At that price, investors should buy a medium-sized position in this growth stock (maybe 2% of their portfolio).