The stock market’s recent shakeout may have rattled investors – but the only permanent damage was to those who lost their nerve and pulled their money out. Like all bouts of market volatility, this one underlined the importance of having a plan and sticking to it.

On September 19, the Dow Jones Industrial Average closed at a record-high 17,279.74. By October 16, it had plunged 6.7% as panicked investors headed for the exits. However, strong earnings reports soon helped the market to rebound: By Halloween, the Dow was back to 17,390.52, a gain of 7.9%.

Like a roller coaster, the market had taken its participants on a stomach-churning ride and deposited them right back where they started out. Unlike many investors, roller-coaster riders don’t jump off the ride at the scary part.

Investors who sold as the market fell hurt themselves in two ways. First, they turned paper losses to real losses. Suppose that on September 19, John Q. Investor owned a $200,000 portfolio identical to the makeup of the Dow. Let’s say that by October 13, with the index having lost 959 points, he lost his nerve and cashed out that portfolio in an effort to protect his money.

John’s emotional response would have trimmed his $200,000 to $189,000. And that would have hurt him in a second way. Because John now has a smaller base of capital to invest, he’ll have to earn 6% – not 5.5% – to grow his portfolio back to $200,000.

Clearly, our hypothetical investor would have been better off had he made no changes to his investments during the dip. Indeed, he would have done well to buy stocks as others were panicking and selling them cheap.

Self-destructive behavior like John’s is rooted in our nervous systems. Like it or not, we have evolved to enrich ourselves whenever possible – with food, money or resources. And when it comes to perceived danger, we’d much rather be safe rather than sorry. Indeed, studies have shown that investors experience more pain from investment losses than pleasure from investment gains. And that helps to explain John’s impulsive sell-off.

We humans can’t rewire our nervous systems, of course. What we can do is use the tools available to us to exercise better investment discipline. And the single best tool may be a financial plan. Having a plan always results in mental preparation, which enables us to better resist our emotional impulses and make sound decisions.

Financial plans help us to clearly identify goals and weather the twists and turns along the path toward those goals. Planning helps us minimize our behavior gaps as we move away from “running for cover” and “swinging for the fences” and toward the far more effective approach of compounding investment returns over time.

The planning process leads us to understand that long-term investing – including opportunistic buying when others are selling out of fear – can help us reach our goals more quickly and efficiently. Investing, like most everything else in life, is not that difficult. What makes it difficult is recovering from all of the mistakes we make – and planning helps us to avoid those mistakes.

If you would like to develop and implement goal-based planning for you and work with an advisor who cultivates your discipline to the plan, we may be able to help.  That’s just part of what we do.