The third quarter of 2018 just ended, and the stock market enjoyed extremely good returns during the period. The S&P 500 (SNPINDEX:^GSPC) had its best performance in nearly five years, climbing more than 7% and setting record highs in the process. Several other benchmarks -- including the Dow Jones Industrial Average (DJINDICES:^DJI) and the Nasdaq Composite -- have also given investors impressive gains.

Yet as impressive as a 7% return in a single quarter might seem, it just barely cracks the top 10 when you look at how the stock market has done over the past 10 years. Below are the best quarters from the period, including those that beat out 2018's third quarter.

Graph showing best quarterly returns for S&P 500 since 2008.

Data source: Yahoo! Finance. Graph by author.

The reason why the S&P 500's third-quarter performance looks so good in comparison to recent history is that the stock market has been extremely well-behaved over the past several years. For a good chunk of that period, there was very little market volatility, with steady gains interrupted only very occasionally by small downturns that quickly gave way to the prevailing long-term uptrend.

By contrast, coming out of the financial crisis in 2008 and early 2009, markets were on edge, and benchmarks saw a lot more volatility. The market didn't always make big moves, but in 10 out of 14 quarters from late 2008 to early 2012, the market finished the quarter either up or down by 10% or more.

Investors need to be prepared for the possibility that more historically normal levels of volatility will return to the market. That doesn't automatically mean that markets will fall, but it does mean that investors need to be on their toes and be ready to adjust to changing conditions quickly. Until then, it's important to keep even solid quarters like the one that just ended in the proper perspective.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.