One of the best strategies in stock investing is simply to buy good stocks and hold them for the long term.

This works because while there will be short-term fluctuations and periodic extended market downturns, historical data shows that in the U.S. market, stock prices generally rise over long periods. And this is especially true for well-run companies that can continue to deliver value to stakeholders.

Besides, a buy-and-hold strategy sidesteps the need for market timing -- and attempting to time the market by buying low and selling high is notoriously tricky. With that in mind, here are two well-established tech companies that investors can buy and hold for the next five years.

Arrow heading upward.

Image source: Getty Images.

1. Tencent: A leading tech conglomerate in China

The first company is one of the largest tech companies in China: Tencent Holdings Limited (TCEHY 1.09%).

The conglomerate has an extensive business empire covering areas such as social media networking, gaming, entertainment, fintech, and cloud computing. While it started mainly as an online messaging service company (QQ), it has expanded over the years to become one of the largest companies in China thanks to its twin strategies of building businesses and investing in leading technology companies.

In the former, Tencent leverages its massive user base (1.3 billion per the latest earnings report) of its flagship social media networking and communication app, WeChat, to launch an array of services in gaming, fintech, and entertainment. This strategy improves user engagement and retention, and has helped grow Tencent's revenue and profitability over the long run.

Tencent's success has resulted in enormous cash flow generation, which it redirects into the second part of its growth engine -- investing in other companies. For instance, Tencent helped Pinduoduo to grow by infusing cash and directing user traffic to it in return for a stake in the company. Tencent did similar things with Meituan and Sea Limited.

Tencent's success is evident in its financials. Since going public in 2004, Tencent revenue has grown by more than 500-fold to 555 billion yuan in 2022. While it is already a large company, it can grow further, leveraging its management's capital allocation skills and WeChat's dominant position in messaging and social media. In other words, the twin-growth engine remains relevant today despite its size.

Still, like all investments, there are risks involved, and one of the most prominent investors should note is the political and regulatory risk of investing in Chinese companies. For instance, the Chinese government fined Tencent around 2.99 billion yuan in July this year as the crackdown on technology companies since 2020 has come closer to an end. Unfortunately, investors have no choice but to accept that politics can interfere with the business affairs of major companies in China.

I think the potential reward of owning Tencent's stock outweighs the downside of the political risks. So, for those willing to accept that risk, buying and holding Tencent's stock for the next five years could be financially rewarding.

2. Amazon: A leading tech giant in the U.S. and beyond

The following company is a household name and e-commerce giant, Amazon (AMZN 2.94%). From its origins as an online bookstore, Amazon has evolved into a diversified tech giant with business spanning cloud computing, digital advertising, entertainment, and more.

In e-commerce, Amazon is the U.S. leader, with around 38% of the e-commerce market share. Its success in this business stems from its intensive focus on customer delight. To this end, it offers arguably the most extensive online shopping catalog, a low-price strategy, and a wide range of services -- fast delivery and Amazon Prime membership -- to attract and retain its customers.

While Amazon started its business with consumer-facing customers, it has expanded into the enterprise business via Amazon Web Services (AWS), which has, over the years, grown into a global leader in cloud computing. In the second quarter of 2023, Statista estimates that AWS held a 32% market share in the worldwide cloud computing infrastructure market, a 10% lead over Azure Cloud  at 22%.

Amazon's achievement to date has been remarkable, but its success brings some potential risks. For example, The Federal Trade Commission  recently sued Amazon, alleging that the technology company is a monopolist that uses anticompetitive and unfair strategies to maintain its monopoly power illegally. Amazon responded that the FTC's lawsuit would lead to higher prices, slower consumer deliveries, and hurt businesses . 

Still, I think the pros far outweigh the cons regarding Amazon stock. For instance, the company believes it is still day one and has much more to achieve in the years to come. This day-one mentality underscores Amazon's culture: always experimenting with the latest ideas, innovating to bring new products and services, and relentlessly focusing on customer delight. With such a culture in place, the tech company is set to keep its growth machine intact for years to come.

Besides, there are external tailwinds that Amazon can leverage to sustain its growth machine. For instance, the migration to the cloud trend will continue for years, if not decades. And with the artificial intelligence (AI) development, AWS is set to grow for the foreseeable future. Similarly, the e-commerce business can continue to grab retail market share in the US and expand in fast-growing overseas markets like India.

In short, I think Amazon is well-positioned to become a more valuable company in the next five years.