By David Pitt, AP Personal Finance Writer

CHICAGO (AP) — Buying and selling stocks at just the wrong time is costly. Yet millions of investors make bad deals every time there is a major market swing.

The recent market downturn is no exception. Investors pulled billions of dollars out of stocks as the markets fell, letting fear lead them to sell as stock prices bottomed.

Many also failed to act quickly enough when the stock market reversed course and surged 76 percent from March 2009 to mid-April of this year. As stocks rose, billions of dollars continued to pour into lower-yielding bond funds rather than stocks. Emotion kept investors from reinvesting and regaining some lost ground as stocks rose.

The reason behind this behavior is quite simple, says Terry Burnham, a former Harvard economist with degrees in economics, computer science and biophysics. He wrote the 2008 book "Mean Markets and Lizard Brains: How to Profit from the New Science of Irrationality."

Burnham is now director of portfolio management for Acadian Asset Management, a Boston-based firm specializing in active global and international equity strategies. He says investors should understand a part of their brain that reacts impulsively to stress and fear. He calls it the lizard brain because it was developed early in the evolutionary cycle to help us find food and retreat from danger, the basic tasks for staying alive.

Even though millions of years later we also have developed the part of our brain that gives us reasoning and logic, the lizard brain often overwhelms us in times of fear, causing irrational behavior.

1. Understand the Enemy Within

Burnham, a presenter at Morningstar Inc.'s annual investment conference on Friday, said step one toward becoming a better investor is to stop blaming outside sources and realize that human nature makes us ill equipped to manage money.

"Lesson number one is the enemy is you," he said. "Your brain is not a silly organ designed to bankrupt you. It is an amazingly efficient machine. It's just built to do something other than to manage money."

He said the sooner investors realize emotional investing is a losing proposition, the sooner they'll improve their performance.

While the emotion centers of the brain are an investor's enemy, the best ally is also in the brain — the prefrontal cortex — the part of the brain that gives us decision making skills and the ability to sort out conflicting thoughts.

2. Override Emotions

The key to avoiding investing mistakes is learning to override emotions.

Every investor has a different set of weaknesses and must learn to understand the point at which emotions kick in and how to stop it.

Burnham, understanding this about himself, had to take precautions when trading online. He said in the days when computers had to have a wire to access the Internet he would detach the cable and Fed Ex it to himself for overnight delivery. The reason? It gave him 24 hours in which he couldn't trade, forcing him to think through a transaction.

"If you day trade securities and you tend to do the wrong thing, at certain points remove your ability to trade," he said. "Don't think you're going to become a different person. Willpower is not the answer."

3. Find a Structure That Works

For many investors, coming up with a plan to defeat the temptations to overreact before the crisis hits is key.

"It's humbling to realize that you're always going to stink at these behaviors," he said. "You're not going to buy at the bottom and sell at the top, and you'll do things that will cost you money."

For example, if you have a 401(k) account with online access and you know you may be impulsive under stress, build obstacles that deter quick reaction. It could be as simple as having only your spouse know the password to your account. That way you have to ask for it first, slowing you down and making you think before you act.

Burnham said for a while he only traded through an expensive telephone broker because it delayed him.

"Part of me hated to pay the charge," he said. "It's about being crafty, putting obstacles in front of yourself."

4. Settle on a Personal Strategy

If you focus in on what your personal weaknesses are, you can develop a strategy that works around them.

For some using low-cost index funds may help.

"If you could have any strategy and not trade emotionally, it's better," Burnham said. "It doesn't matter whether it's index, active or passive."

The key is consistent investment over a long time, resisting the temptation to pull out and get back in.

For some people having a preprogrammed trading plan might work.

A dollar cost averaging plan in which a set amount is invested over specific periods of time is a good practice — such as $100 a month.

Investors in 401(k) plans who consistently remain invested over decades dollar cost average. When stocks fell and they remained invested, they were buying more shares at lower prices.

The key to overcoming the basic instincts in the primitive brain is to "lock the lizard in a cage," Burnham said.

Force your self to slow down to avoid impulsive action, analyze facts, and involve others if necessary to slow yourself down.

Copyright 2010 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

—For the best rates on loans, bank accounts and credit cards, enter your ZIP code at