The Nasdaq Composite Index is down 26% year to date as of this writing. Top stocks like Amazon (AMZN -1.14%) and Apple (AAPL -0.57%) have corrected 30% and 20%, respectively, so far in this year. Obviously, investors are concerned about their investments.

Yet if you look at a longer time horizon, you'll realize that your portfolio should do well, irrespective of steep corrections on the way. Let's look at three stocks that have turned $1,000 into half a million dollars, even after correcting steeply in this year. Although past performance is no indication of how these companies may fare in the future, it does give some important lessons on long-term investing strategies.

1. Amazon

Amazon went public in May 1997. Its IPO (initial public offering) price was $18, but adjusting for the four stock splits the stock has undergone so far, the IPO price comes to $0.075. If you had invested $1,000 in Amazon at the time of its IPO, your investment would have risen to half a million dollars (rising 500 times) in 2017 -- that's roughly 20 years.

AMZN Chart

AMZN data by YCharts

What's more, by now, that amount would have more than doubled again. In other words, your $1,000 investment would have risen to nearly $1.2 million, even after the recent correction.

AMZN Chart

AMZN data by YCharts

Considering the many areas in which Amazon is expanding, like cloud computing, there still seems to be lots of growth ahead for this online retail pioneer.

2. Apple

Apple, which went public in December 1980, has split its stock five times since its IPO. An amount of $1,000 invested in Apple stock in June 1998 -- 24 years ago -- would have turned into roughly $550,000 today.

By comparison, if invested at the time of Apple's IPO, the amount of $1,000 would have been $1.1 million today.

AAPL Chart

AAPL data by YCharts

Nearly $102 billion in net income in the trailing 12 months, a strong brand name for quality products, several new growth avenues, a strong cash position, reasonable valuation -- the list of reasons to like Apple stock is long.

3. Home Depot

Home Depot (HD 0.02%) stock would have turned $1,000 invested in 1988 to more than $500,000 today -- in roughly 34 years. By comparison, if you had invested the same amount at the time of its IPO in 1981, you would have $22.5 million, including dividends, today.

HD Total Return Price Chart

HD Total Return Price data by YCharts

Not only has Home Depot fared well over decades, but it also reported strong results in the latest quarter. Although investors are concerned about the impact of rising inflation on the company's performance, management looks confident of being able to navigate it successfully. With a dividend yield of 2.5%, the stock offers an attractive combination of income and growth.