A graph on a screen at the New York Stock Exchange in New York City. - 

Back in 2009 I was working at a bank in London, and had begun earning enough money to really start investing. I'd studied behavioral economics all through college and grad school, so I knew I'd be better at investing than the average Joe.

This was in the midst of the Great Recession, and the price of oil was incredibly low. I had read a few articles, and thought the price had hit bottom. I was sure it could only go up, so I bought into a fund where every 1 percent increase in the price of oil would net me a 2 percent return. Not too bad. I thought I'd need to hold the position at least three months to see the returns I expected. Now all I had to do was wait.

I checked my investment all the time, sometimes twice a day or more. To my chagrin, it fell the whole first week. The second week started out the same, and I got really stressed. Why wasn't it going up? Had I got something wrong? But then the price of oil began to rebound, and by the end of the second week, the investment had returned to the buying price. I sold immediately with zero return. Well, not exactly zero return -- with the cost of the "buy" and "sell" trades factored in, I made a return of -2 percent. Ouch.

Mind Games &Money -- Browse other stories in our collaboration with the New York Times. Plus, take our quiz to see how much emotions impact your personal finances, see the 15 happiest and saddest U.S. cities based on tweets, watch a video explainer about "goodwill," and learn lots of good facts about money and emotions. Explore now.

So even with all my training in behavioral economics, I fell for a classic investment mistake we call the disposition effect. It's probably one of the most studied behavioral biases out there. It says investors tend to "sell the winners, and hold onto the losers" for purely emotional reasons. Basically, it feels good to close out a position with a gain (selling the winners). And it feels really bad to sell at a loss. As a result, investors tend to hold onto their losers for longer -- often until they break even.

Now obviously, if you sell your winners and hold onto your losers, you end up with a portfolio of losers -- not a good place to be. While I had studied the disposition effect inside and out, it wasn't enough to prevent me from falling prey to it. In the heat of the moment, watching my investment and pride plummet, I was most concerned with ending my anxiety, and not feeling like an idiot.

This isn't surprising -- we know we shouldn't do a lot of things like smoke, drink, eat junk food, etc. But sometimes the hard part isn't the knowing, it's the doing.

Follow Dan Egan at @@daniel_egan