The Nasdaq Composite index has nearly tripled in value over the last five years and continues to hover close to new highs. For some investors, this suggests the stock market might be a little frothy at the moment. But even in a frothy market, smart investors can still find great companies worth buying and holding for the long term.

If I had $5,000 available to invest, two stocks I would buy today are Amazon (AMZN 0.58%) and DocuSign (DOCU 0.53%). These companies have the growth potential to turn a $5,000 investment into $10,000 in five years. Here's what you need to know about these two buy-and-hold tech stocks.

An Amazon customer carrying a delivery box.

Image source: Amazon.

1. Amazon

Amazon just reported its second-quarter earnings and continues to show why it's a great investment. While the stock price fell the day after its results were released, the business is growing at healthy rates and the price is likely to recover quickly. Net sales increased 27% year over year, which is noteworthy for a business that is approaching half a trillion dollars in annual sales. 

Looking beyond the headline numbers shows a company with a lot of opportunity in front of it. Amazon added 50 million new Prime members in the past 18 months, bringing the total to over 200 million.

Amazon's advertising business continues to grow really fast. Other revenue, which includes advertising, grew 83% year over year in Q2. "Amazon advertising is innovating at a fast clip, launching over 40 new features and self-service capabilities in the quarter, making it easier for sellers, companies, and authors to grow their businesses by helping customers discover their brands and products," CFO Brian Olsavsky said during the earnings call. 

Amazon Web Services' revenue accelerated last quarter, up 37% year over year and reaching $52 billion on a trailing-12-month basis. More organizations continue to migrate to cloud solutions for compute, storage, analytics, and machine learning capabilities. With an operating profit of $4.1 billion in the quarter, AWS is now more profitable than Amazon's North American retail operation. 

Based on these notable achievements in Q2, I would look at the post-earnings sell-off as a buying opportunity. In the context of the $5 trillion global e-commerce market, Amazon is still a small fish in a big pond. At the pace Amazon continues to grow, the stock could potentially double your money over the next five years.

2. DocuSign

Investors should keep this fast grower on their radar. DocuSign's stock price is up 653% since its 2018 initial public offering, but it's just getting started. The company is blazing a trail of high growth by helping businesses save time, labor, and a whole lot of paper with its eSignature platform. 

The company hasn't reported its second-quarter earnings yet, but in Q1, revenue grew 58% year over year. 

"We've increasingly become the way people agree in this emerging anywhere economy -- and that's not only helping organizations continue operations during the pandemic but helping them realize new and more efficient ways of doing business in the future," said CEO Dan Springer.  

In DocuSign's most recent fiscal year, it reported that 80% of all transactions on its eSignature platform were completed in less than 24 hours, with 44% completed within 15 minutes. But there are still many organizations that have yet to discover those benefits.

The total addressable market is estimated at $50 billion, but DocuSign is expected to report just over $2 billion in revenue in 2021. 

Revenue accelerated for the fifth straight quarter in Q1, which ties in with what Amazon is seeing with its cloud services segment -- businesses are accelerating their shift to digital services coming out the pandemic. "We believe this trend will only accelerate as the anywhere economy continues to emerge," Springer stated in the first-quarter earnings report. 

The shares are richly valued, trading at a high price-to-sales ratio of 35, so expect some volatility. But if you can ride out the bumps in the road, this stock should turn your $5,000 into a much larger amount in 10 years.