Emotion-driven actions in the stock market can be hazardous to your wealth. Most investors understand this, at least in theory. An action based on emotion-driven impulse, instead of sound logic and planning, is more likely to be a mistake — and possibly a costly one.

Even worse, it can sometimes feel like an action is based on rationality and logic, when the action was actually irrational or emotion-driven.

This happens because the brain is very good at inventing reasons — coming up with justification after the fact for an action that was taken. In fact, not only is the brain skilled at this, you could say it’s a human brain specialty.

This makes it easy to take an unwise investment action based on emotion — like greed, fear, or frustration — and then come up with plausible sounding reasons to justify the action during or after, as if it were based on logic instead of impulse.

And when the brain does this, it typically doesn’t recognize the invented logic came second. Instead the brain fools itself into assuming the reason led to the action, even if this wasn’t the case at all. This makes it easy to confuse emotion with logic, which is particularly dangerous in markets.

As an investor, there are concrete steps you can take to prevent this from happening (and to protect your portfolio from stray emotional impulses).

But before we talk about those steps, let’s take a closer look at how we know the brain is good at fooling itself — thanks to a series of fascinating “split-brain experiments” that began in the 1950s and ran for more than 50 years.

The experiments were a rare window of opportunity for neuroscientists and psychologists, who could never have otherwise studied the split-brain condition in humans.

A little anatomy background: The brain is naturally divided into two hemispheres, the left and the right. These hemispheres are connected by the corpus callosum, a dense band of nerve fibers that act like fiber optic cables. The corpus callosum enables communication between the hemispheres.

In the 1940s, a group of 26 people in Rochester, New York had their corpus callosum severed — cutting the link between the hemispheres — as a last resort treatment for severe epilepsy.

This was done to contain seizure-inducing electrical impulses in just one brain hemisphere. Other patients had the operation done over the next four decades, into the late 1970s and early 80s, until better methods for controlling epilepsy were introduced.

The first patients to get a corpus callosotomy (the name of the operation) seemed to behave and function normally, and the early consensus was that disconnecting the hemispheres had no effect.

But Roger Sperry, a neuroscience researcher who would later win the Nobel prize, disagreed. He devised a series of split-brain experiments conducted on cats and monkeys and pioneered the study of human split-brain patients who had undergone the epilepsy procedure.

With a series of clever experiments, Sperry proved beyond a shadow of a doubt that the two brain hemispheres are independent. In cats and monkeys, Sperry could show the hemispheres had no communication with each other. In some cases, different memories were formed simultaneously, via alternate hemisphere inputs coming in for each eye; it was like two separate brains in the same head.

With the help of human volunteers, Sperry and his graduate student, Michael Gazzaniga, created split-brain experiments to show the different jobs of the left and right brain hemisphere in human beings. Gazzaniga later carried on and expanded Sperry’s work, becoming a champion of volunteer split-brain experiments for 50-plus years.

Sperry and Gazzaniga’s first volunteer breakthrough came in 1962. A patient known by the initials W.J. had been a paratrooper in World War II and had developed severe seizures after getting slammed in the head with a German rifle butt.

When W.J. volunteered after having his hemispheres severed, the researchers had the chance to test their split-brain theories. They discovered, to their astonishment, that not only did the left and right brain hemispheres have different jobs, each hemisphere truly had no idea what the other was doing.

The brain’s left hemisphere is connected to the right side of the body, and the right hemisphere is connected to the left. This means that, in a split-brain patient, input from the right eye is only processed on the left side of the brain, and vice versa for the other eye. This is what allowed for a series of clever experiments: Information could be sent to one hemisphere at a time to see what happens.

Sperry and Gazzaniga discovered that the left hemisphere is responsible for language and articulation, while the right side is responsible for things like spatial intelligence and interpreting emotions. For example, when W.J. was shown an image to his right eye (left hemisphere) and asked to describe it, he had no trouble. But when an image was shown to his right hemisphere, he could not find the words.

They also found that, for images shown to the right hemisphere, split-brain patients could draw what they were seeing but not describe it with words.

And for images shown to the other hemisphere, they could articulate what they saw but not draw it — because the facilities for drawing something, versus using words to describe it, are separately located in different hemispheres. And the two hemispheres, when severed, have no awareness of each other.

Sperry and Gazzaniga further discovered that, even though the left and right hemispheres had no communication in split-brain patients, the left hemisphere still retained a sense of control. Some volunteers showed signs of split personality disorder, but many did not.

This led Gazzaniga to propose the “left-brain interpreter” theory, which sums up more or less like this: The left-brain hemisphere, which is responsible for language and logic, will rationalize explanations on the spot — or make up reasons from whole cloth if need be — in order to make sense of the world.

To put it another way: If there is a gaping hole in the brain’s information flow, the left brain will subconsciously fill it in.

Split-brain patients showed this through constant attempts to rationalize behavior with made-up logic, even when the left brain was completely in the dark. A typical finding would go like this:

  • An amusing picture is shown to the right hemisphere; the patient laughs.
  • The researcher asks, “Can you describe why you were laughing just now?”
  • The patient responds, “Because you’re funny,” or recalls a joke they heard.
  • The left hemisphere invents, and believes, a false laughter explanation.

Again, the reason this happens is because, when an image is shown to the right brain hemisphere, in a split-brain patient the left hemisphere has no access to it; the left brain does not know it exists.

But when the researcher asks, “Why were you laughing just now?” the volunteer has to respond with words and logic, the province of the left hemisphere. Lacking any real reason, the left hemisphere simply makes something up — and the person honestly believes the made-up explanation is correct.

It gets even stranger. The researchers discovered the right brain hemisphere has the job of evaluating the emotional states of other people, which meant split-brain patients had their logic center (left hemisphere) and empathy center (right hemisphere) disconnected.

As a result, when split-brain patients were tasked with using left-brain logic to make moral or emotional judgments, they struggled or failed. A lack of right-brain input impaired their moral agency.

We can know from these experiments that, even in a connected brain, emotional responses are processed in one area and logical responses in another.

We can also know that, in an effort to make sense of the world, the left brain hemisphere will readily “fill in the gap” with explanations — even if the explanations are after the fact and completely made up.

This design feature makes the human brain naturally good at certain things — like going with the flow in a cooperative social group — and naturally flawed at other things, like behaving rationally in markets.

It is all too easy for the brain to act on a dangerous emotional impulse provided by the right brain hemisphere, and then to gussy things up with a made-up reason from the left hemisphere, fooling the investor into thinking they were being “reasonable” (pun intended) all along.

The way to guard against this is to lay down rules of logic as a first order of business. If you have strong rules, and awareness of how important it is to follow the rules, then emotional impulses will get deflected by a guardrail rather than veer you off course.

Seasoned and successful investors can certainly use their intuition in markets, which sometimes means responding to an emotional hunch or “gut feel”; but in the case of the successful investor, even a hunch or gut feel response will be shaped by long-held logical rules.

Another good habit is asking yourself, “Why am I making this decision?”

This comes in handy as a form of impulse control, especially if a decision feels questionable or strange. While the left-brain hemisphere is good at making up explanations, it can also think twice or change course if a thorough examination calls for it. Just being actively aware of the role emotional impulses can play is a big step forward.

And last but not least, software can help make any investor more rational — even Wall Street pros — by providing guardrails that exist outside the mind. The more that the investment process is driven by tools that encourage winning habits, the better the results can potentially become.