The recent vote in Britain to exit the European Union is yet another reminder of how markets often react negatively to surprises. We cannot help but ask ourselves, “Is it different this time? Maybe this is the event that upends markets as we know them, and I would be stupid not to react!”

As it turned out, markets settled down quickly after this latest surprise, but it reminds us that long-term investors must endure these market downturns because no one has the crystal ball that would allow us to avoid them.

Sometimes surprises have profound and long-lasting effects. Those of us who have been saving for retirement for the past thirty years or so have seen plenty of surprises, and I think it is helpful to put some of the results in perspective. Looking back from 2016, it is interesting to note how disappointing our recent experience has been. Since 1940:

• The worst 3-year performance for the S&P 500 ended in March of 2003 (-16.09% annualized).
• The worst 5-year performance for the S&P 500 began a year later in March 2004 (-6.64% annualized).
• And the worst 15-year performance for the S&P 500 ended in August 2015 (+3.76% annualized).

In other words, the technology/dot-com bubble that ended in March 2000, and the financial crisis of 2008, were back-to-back disastrous surprises for the stock market. The fallout has consumed more than half the working career of anyone much under 50 years old, and had a negative impact on those who are older and trying to save for retirement in their peak earning years.

Another interesting fact: If we add the previous ten years to that worst 15-year period (25 years beginning in September 1990), the S&P 500 realized annualized returns of 9.8% – very close to longer-term averages.

Some conclusions we can draw from these observations:

• Time horizon matters – 15 years is not a long time for a long-term investor, and anyone planning for retirement should be a long-term investor.
• It’s different every time – the cause of the surprise is almost always different than the last time markets were shaken, but long-term investors must be ready to endure the inevitable downturn.
• The best reaction is almost always the same – check your risk profile to be sure it is appropriate for your situation, then rebalance to your targets, buying stocks at discounted prices.
• Staying the course makes sense – the major market run-up in the 1990’s was as unforeseeable as the subsequent downturns.

Events like the Brexit vote test our patience and tolerance for risk. Maintaining a long view to the future, and keeping history in perspective, can help us make better investment decisions.