I have to admit that when I first started trading online, I thought I was pretty hot stuff.

When I did well, I told myself it was because I was shrewd. When I made a mistake, it was bad luck. Buy. Sell. Buy. Sell.

It was exhilarating, like being a child who's just learned to ride without the training wheels. I was brimming with new confidence and perhaps overdid it--fortunately, not disastrously.

I am reminded of the "old me" by a wonderful research paper just published in draft form by Brad M. Barber and Terrance Odean of the University of California at Davis. They are among the few scholars who have actually analyzed the real-life habits of the species Traderus onlinus. (They looked at the accounts of 1,607 investors between 1991 and 1997, before and after they went online.)

It is a study in overconfidence. See if you recognize yourself.

Barber and Odean found that the online traders were better investors before they went online than after. They found, indeed, that it was the act of going online that made them less successful.

The basic reason for this success deficit was overconfidence. Overconfidence prompted them to go online, online information convinced them they knew more than they did once online, and the combination convinced them to trade a lot.

Trading a lot hurt their rates of return, which, as I noted, were better before they went online.

"It is difficult to reconcile these results with rational behavior," Barber and Odean write.

Now, before I elaborate, let's us talk. This study is not one of those knee-jerk attacks on the new class of retail investors who dwell online. It's based on solid research--and well-informed hypotheses--and the professors have a distinguished record in their field.

So if you're an online investor, don't get all mad about it. Do something about it, starting with understanding the dynamic. While I do believe I've improved as an online investor over the years, and am conquering bad old habits, I remain nevertheless locked in combat with my own personality, never knowing, between me and it, which will win. Reading about the most successful professional investors reminds me that they confront the same struggles--sometimes resolving them with computer programs or ironclad "systems" that purportedly remove any emotion from the equation.

It is well documented in the social sciences that people tend to be overconfident and that the more difficult the task, the more overconfident they are. (An earlier Barber-Odean study found that men were more overconfident than women. Surprise, surprise.)

Overconfidence is especially prevalent in fields where the eating of the pudding is somewhat separate from its preparation--as in investing, where we may not feel the collective impact of a series of decisions for some time.

Compounding this overconfidence is a kind of faulty internal system for analyzing what we've done and why we've done it, what Barber and Odean call the "self-attribution bias." The people in their study switched to online investing in part because they did well offline in the first place. (The investors in the study tended to comfortably outperform the market, by roughly 2.4 percent annually.)

Their mistake, their bias, was in attributing their success to their own skill--which may or may not be valid--while ascribing any failures to "bad luck or the actions of others."

Sound familiar?

Once into the online world, they encountered what they may have perceived to be even more reasons to be jaunty, specifically, the "illusion of knowledge."

"Online investors have access to vast quantities of investment data," write Barber and Odean, "often the same data as is available to the professionals." The problem is they don't have a professional understanding of how to interpret it.

Worse, the effort they put into gathering all the information makes them even more inclined to trade (which tends to reduce returns). They've done all this research. Isn't it a waste if they don't act on it?

This doesn't mean the information is useless, Barber said in an interview: "More information is generally a good thing. But what you need to know is whether you have more information than the market does." In other words, have you really learned something about a stock or about, say, the economy, that hasn't already been somehow factored in and discounted by everyone else?

These folks in the study didn't go down the tubes, mind you. They weren't crazed day traders. They just got worse returns on their investments. They went from outperforming the market before they started trading online to underperforming by roughly 3.5 percent annually.

Some of you will gloat at this study. You know who you are--people who argue that the individual investor can't do it, or can't do it well or can't do it without a professional; those arrogant, besuited guys in the ads who are shown up by the barkeep who turns out to be a billionaire thanks to E-Trade.

Don't gloat. At least the online investors are investing, trying. Before you laugh, ask yourselves, what are you doing with your money? Buying 58-inch television sets?

Others of you will read it and weep. You shouldn't. Studies like this offer lessons far more useful than all the stock screens and Web sites in the world, because they can make us aware of our own weaknesses as investors and help us to overcome them.

"Take advantage of the lower costs" of online trading for sure, said Barber. Trade "if you need to execute tax-loss sales, or rebalance a portfolio for risk purposes, or make an investment for savings purposes. But don't increase your speculative trading. The message of all of our work is that trading is hazardous to our health."

(Frankly, I'm not sure I buy this completely. I've dumped stocks that were sitting there doing nothing so I could buy stocks that were moving well and have had no regrets.) But I admit statistical measures do generally show that frequent buying and selling tends to reduce returns, sometimes significantly.

In my own experience, part of the enjoyment of investing is developing the discipline necessary to do it well, not through some formula or some system, but through the ability to unemotionally analyze what I'm doing, why I'm doing it, and whether or not it makes sense--and afterward to make a cold, hard calculation about the consequences of what I've done.

And let's face it. Part of the enjoyment of online investing, for some of us, is that we're doing it ourselves. It's fun. It's a hobby. I know I'm not supposed to say this--I may get sprayed with hostile e-mail for saying it--but it's like golf: You play against a course, not necessarily a particular opponent.

You should, of course, be diversified in your investments so that your fun isn't your life savings--but the fact that your returns are 8 percent a year, say, rather than 9 percent, is not the end of the world. Note, however, that the traders in the study did significantly worse after going online--going from that 2.4 percent outperformance to 3.5 percent underperformance annually. Over the years, that's a lot of money for fun.

This could explain why the subjects in the Barber-Odean study trade more. It wasn't very entertaining to call a broker and trade. It can be extremely entertaining to do it yourself.

So don't feel rotten if you're an online investor. Barber and Odean note that the data were from the first wave of online investors. Perhaps we've improved, though I suspect that the second and third waves are probably wilder than the first.

You can read Brad Barber and Terrance Odean's studies at www.gsm.ucdavis.edu/ odean/.

Fred Barbash (barbashf@ washpost.com) is the Post's business editor.