As President Obama ponders his next moves in Afghanistan, he ought to heed what the experts have to say about a seemingly unrelated field: investor psychology.

Think of Afghanistan Inc. as a distressed company in which the U.S. pension fund has already invested billions of dollars. Should the fund invest billions more to try to rescue the enterprise, or call it quits?

Analysts arguing for upping the stakes warn that the company may be “too big to fail.” If Afghanistan collapses, investors might lose faith in the entire sector and put the larger economy at risk.

Analysts who call for liquidating the investment say it would be folly to invest more in a company whose CEO won his post through a rigged shareholder election, whose major divisions are run by gangsters and drug traffickers, and whose disgruntled workers are sabotaging production lines on a daily basis.

Successful investors don’t rely on crystal balls or insider information to weigh such arguments. Instead, they consciously correct for the human biases that drive the rest of us to make the same errors repeatedly.

In particular, smart investors pay heed to the insights of behavioral finance experts like Princeton psychologist Daniel Kahneman, who won a Nobel Prize in economics in 2002 for unmasking the irrational impulses of homo economicus.

Kahneman and his collaborator Amos Tversky showed that people care far more about the risk of losing money than they do about the prospect of winning an equivalent windfall—a tendency called loss aversion.

Loss aversion is one reason most people hang onto bad investments far too long rather than face the fact of their losses by selling.

It’s also why so many gamblers can’t bear to walk away from a losing table, and instead keep placing one more bet until the house cleans them out.

Studies show that investors compound such irrational behavior by seeking confirmatory evidence for their preconceptions and forgetting past failures.

It doesn’t take a Nobel Prize to see that such systematic biases apply to politics as well.

As Rutgers University political scientist Jack S. Levy noted in 2003, findings about the human tendency to want to recoup sunk costs “help to explain why states continue to pursue failing military interventions . . . rather than cutting their losses and negotiating a withdrawal . . . , as evidenced by France in Algeria, the United States in Vietnam, the Soviet Union in Afghanistan and Israel in Lebanon.”

Indeed, in 1965, Undersecretary of State George Ball famously predicted that if the Johnson administration escalated in Vietnam to avoid losing the war, it would never be able to reverse the policy: “We won’t get out. We’ll double our bet and get lost in the rice paddies.”

President Obama should heed these powerful insights today as he weighs the pleas of advisers to double our bet in Afghanistan. To keep us from getting further lost in its desert sands and rugged mountains, he must consciously resist our collective aversion to admitting and accepting losses.