US flags fly outside the NYSE building on Wall Street
Matteo Colombo/Getty Images

The stock market has had a fabulous ride over the last decade, more than tripling its price.

You might have forgotten that, what with all the years of worry over Brexit, an inverting yield curve, rising interest rates, impeachment and many other scares of the day. In the meantime, stocks have gone on to rise 249 percent (as of market close on Dec. 18), as measured by the Standard & Poor’s 500 Index, making it a fantastic decade for investors, if the numbers stay here through the end of the year.

A decade ago the U.S. economy was dealing with the worst economic crisis since the Great Depression. The S&P had seen its worst decade ever – even worse than the depression-era 1930s. But that set up a period of solid gains in the 2010s. And if you fudge the start date a bit, to the market’s low on March 9, 2009, then stocks returned an astronomical 372 percent.

Here’s how the S&P 500 in the 2010s stacks up against its performance in prior decades.

The best ten-year period for stocks was the 1950s, with a total return of nearly 487 percent, including dividends. The 1990s and 1980s weren’t far behind, though, with returns of almost 433 percent and 404 percent, respectively. Stocks finished the 1990s, of course, with a blistering performance, as investors rushed into the dotcom boom.

That dotcom boom soon went bust, however, setting up the miserable returns of the following decade, the 2000s. Start to finish, the S&P 500 lost about nine percent over the decade, which culminated in a massive decline in stocks as part of the global financial crisis.

That poor performance set up a low base for stocks over the most recent decade, and stocks climbed nicely from that base, performing well even though previous decades fared better. A buy-and-hold investor at the start of 2010 could have earned more than a 200 percent return. Of course, investors who purchased at lower prices in 2009 did even better, if they held on.

As strong as the returns for the S&P 500 were over the last decade, investors could have done even better in some individual stocks, including some that were already household names.

[READ: Best long-term investments]

Some individual stocks did even better – and some didn’t!

An index’s performance is a weighted average of the stocks in the index. Some stocks perform above that average and others below. By picking a few of the higher-performing stocks, investors can do even better than the index, sometimes fantastically better.

Here are a few of these stellar stocks, each of which was known to the public 10 years ago.

Amazon

Amazon’s performance was remarkable, and more so because it wasn’t a hidden stock but a company that many Americans already knew. The company grew its e-commerce business quickly over the past decade, expanded its highly profitable web services unit and has now begun its own shipping operation, too. From the start of the decade to now, Amazon delivered returns of about 1,200 percent. (Here’s how to buy Amazon stock and what to consider first.)

Apple

Apple went into the decade with a huge hit on its hands, the iPod. In 2007, it released the iPhone, ushering in the smartphone era, and it wasn’t until 2010 that the iPad debuted. It feels like the stock has only gone up in the 2010s.

Like all stocks, Apple has had its ups and downs, but in the last decade it posted extraordinary returns, turning every $100 investment into $1,000. (Here’s how to buy Apple stock and whether it’s right for you.)

Facebook

Facebook didn’t debut as a publicly traded company until 2012, and the market didn’t give the company a warm reception. After a first day pop, the stock stumbled, but it was buoyed by a quickly growing business, and shares climbed rapidly. Since the close of its first day the stock has delivered returns of 400 percent, and those who bought in the year after its IPO did even better. Facebook was probably the decade’s highest-profile IPO and one of the most successful. (Here’s how you can buy the stock.)

Uber

While we can point to some notable successes over the last decade, well-known stocks can decline substantially, too. Even those stocks touted for greatness can plummet. A case in point is the ride-sharing company Uber, one of 2019’s most highly anticipated IPOs.

The stock has been stuck in reverse since its May debut, losing investors 28 percent from its closing day. It’s been burning cash at a fierce rate, and it’s not clear that things will ever turn  around. Plus, the company features another hidden risk that might elude many investors.

So what can investors expect from the 2020s?

The last decade offers some important insights for how investors can profit in the 2020s.

Ignore the noise and hold tight

Over the last decade, investors had no end of alleged reasons to sell – rising interest rates, Brexit, a potential return of the financial crisis, and now concerns about impeachment. But history suggests that selling on short-term worries hurts your long-term returns.

As an old Wall Street truism says: “The market climbs a wall of worry.” While short-term concerns may hit stocks, the company’s fundamental performance drives long-term returns.

So it’s valuable to ignore the short-term noise and fear-mongering, especially when they have little or nothing to do with the performance of the business. That’s even more true for an index such as the S&P 500, whose broad diversification limits your exposure to any single company. Over time, the index moves on the health of the U.S. economy, not the latest concern of the day.

Poor performance sets up good performance

It can be tough to hold on to stocks when they decline, but that poor performance often sets up a good performance later. When low expectations are built into a stock price, prices are cheap, and later more enthusiastic investors can bid them higher. That’s easy to see from the poor performance of the 2000s – down 9.1 percent – and the 2010s – up 249 percent.

The market usually reverts to the mean, and good years are followed by a bad year, returning the market to its long-run average, about 10 percent annually over time for the S&P 500. If you earn much more than this over long stretches, then future returns may be lower.

“The next decade could have a reversion back somewhat to the low single digits average, if you look at the historical annualized returns,” says Daniel Milan, managing partner of Cornerstone Financial Services. But he emphasizes that new technological advances helped drive profits last decade and more may be on the way, led by technology such as 5G communications.

But good performance won’t last forever

Low interest rates and soaring corporate profits have helped drive stocks higher, as the Federal Reserve held rates near zero for years. But the Fed may not always be lowering rates, as we’ve seen in the last few years, and company earnings typically decline in a recession. While the decade has seen strong returns, investors need to avoid being complacent.

“Investors should not take away from this that stocks only go up,” says Anthony Denier, CEO of commission-free broker Webull Financial. “Markets and investments move in cycles. Investors should expect this economy to eventually fall into recession – although when is anyone’s guess – and then stocks will fall, and bonds yields will rise.”

[COMPARE: Best online savings rates]

Diversification reduces your risk

“Investors should also think about diversifying before it’s too late,” says Dean Vagnozzi, president of A Better Financial Plan, LLC.

Diversification can mean having a mix of different investments. An S&P 500 index fund is a well-diversified mix of stocks, but even a collection of stocks can fluctuate drastically, and it does not include other assets such as bonds, real estate and safe cash accounts such as CDs.

“The most important strategy that an investor should implement over the next 10 years is … being well diversified across sectors in equities, fixed income and real estate,” says Milan.

“If you…research the options for alternative investments that are not subjected to stock market volatility now, you will save yourself the stress and headache of having to make an emotional and impulsive decision when the market does eventually go through a correction,” says Vagnozzi.

Diversification not only limits your downside loss, it can actually increase your returns, too.

Let your time horizon guide you

While stocks usually perform well over long periods, in the short term they can be tremendously volatile. Diversification can help balance your investment risk, but the passage of time can help. The longer your time horizon, the longer you can stick with stocks to let them soar.

“If you need to take from your kids college savings in four years, don’t be as aggressively invested as you would with your retirement savings which you will not need for 10 or more years,” says Daniel Lash, certified financial planner at VLP Financial Advisors.

So be careful if you use stocks to plan for immediate goals – such as the down payment on a house – because the money may not be there when you need it.

“Don’t have expectations for the market, but have a plan to accomplish your goals around your spending and savings, the things you can control,” says Lash.

Bottom line

Those looking to get into the stock market have two broad choices: buy individual stocks or buy a fund. If you’re willing to do the legwork and analyze companies, then you may be able to earn more than you would by buying a fund. But for investors who don’t have specialized knowledge or who simply don’t want to evaluate companies, buying – and importantly, holding – a broadly diversified fund such as an S&P 500 index fund can still deliver excellent returns.

But one of the best lessons from the last decade (and all time) is to stay invested if you want the potential for strong returns. You won’t have the chance to profit from stock if you don’t own any.

Learn more:

Editorial Disclaimer: All investors are advised to conduct their own independent research into investment strategies before making an investment decision. In addition, investors are advised that past investment product performance is no guarantee of future price appreciation.