The S&P 500 has rallied more than 3,500% over the past 50 years. Investors who bought and held stocks through those five decades -- which saw six recessions and multiple market crashes -- were well-rewarded for their patience.

Past growth never guarantees future gains, but we should assume the market will overcome its near-term challenges and rise higher over the next 50 years. Here are three high-growth stocks that belong in your long-term portfolios: Amazon (AMZN -1.11%), Veeva Systems (VEEV -0.58%), and Tencent (TCEHY -0.44%).

A golden hand holds up numbered "50" balloons with hearts.

Image source: Getty Images.

1. Amazon

Amazon owns one of the largest e-commerce marketplaces in the world, and Amazon Web Services (AWS) is the world's biggest cloud infrastructure platform. Amazon subsidizes the growth of its lower-margin marketplaces with its higher-margin cloud revenue, which makes it easy to crush smaller retailers with loss-leading strategies.

Amazon also owns the third-largest online advertising platform in the U.S., and its Prime Video and Amazon Music services are gradually gaining ground against Netflix and Spotify, respectively. Moreover, it's the world's largest maker of smart speakers, and it's expanding its brick-and-mortar presence with Whole Foods stores and cashierless Amazon Go stores.

Amazon connects all those dots with its Prime ecosystem, which surpassed 150 million global subscribers at the end of 2019. Those subscriptions -- which grant members exclusive discounts, free shipping options, access to its streaming services, and other digital perks -- widen its moat against both retailers and tech ecosystem rivals.

In other words, Amazon's stock still has plenty of room to run despite soaring nearly 1,800% over the past 10 years. Amazon's business will expand and evolve over the next few decades, but its grip over the retail and cloud markets should remain strong as it expands its advertising and media ecosystems.

2. Veeva Systems

Veeva isn't a household name like Amazon, but it's arguably just as resilient. The cloud services company's tools help healthcare giants like GSK, AstraZeneca, and Novartis maintain customer relationships and track industry regulations, clinical trials, prescribing habits, and other data in real time.

A scientist examines a pill.

Image source: Getty Images.

These services keep its clients on the same page and prevent them from wasting time on redundant or failed treatments. Veeva's core platform is a customer relationship management (CRM) service that runs on Salesforce's app development platform, and it locks in customers with additional services -- including a data warehouse, employee training tools, and an artificial intelligence (AI) assistant.

Veeva enjoys a first mover's advantage in this niche market, and it doesn't face any meaningful competitors yet. The global healthcare CRM market could grow from $7.3 billion to $28.9 billion between 2017 and 2026, according to Research and Markets, and that growth could continue for decades as the competition intensifies between big pharma and biotech companies.

Veeva went public at $20 per share in late 2013, and its stock currently trades just below $200. That near-tenfold gain is impressive, but the stock could still rack up bigger gains over the long term.

3. Tencent

Tencent owns WeChat, the most popular messaging app in China with over 1.16 billion monthly active users. Over the past three years, Tencent expanded WeChat into an ecosystem with over 300 million Mini Programs for accessing e-commerce marketplaces, ride-hailing services, payments, and other services without ever leaving the app. It also holds a near-duopoly in China's digital payments market with Alibaba-backed AliPay.

Tencent is also the world's largest video game publisher, China's second-largest cloud platform provider after Alibaba (BABA -1.14%), and the country's fourth-largest digital advertising platform. It also owns Tencent Video, a growing list of other mobile apps and investments, and a controlling stake in streaming giant Tencent Music.

That sprawling ecosystem -- which is tied together by WeChat, its older messaging network QQ, and its payment service WeChat Pay -- shores up Tencent's defenses against potential rivals like Alibaba and Baidu. Its diversification also guarantees that it will be a bellwether of the growing Chinese tech sector over the next 50 years.

Tencent's stock rallied nearly 1,300% over the past decade, but its three core growth engines -- gaming, advertising, and fintech and business services -- should continue growing and generating fresh cash for the company to expand into new markets. That ongoing expansion could lift the stock even higher over the long term.