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.

Dan Caplinger has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.