The stock market has raced to record highs this year, but your portfolio may not show it.

In some ways, that’s to be expected: A balanced portfolio won’t post the same returns as the Dow Jones industrial average or the Standard & Poor’s 500, nor should it. You would have to be 100% invested in stocks to mirror the market’s performance, and that kind of aggressive allocation may not be appropriate for your risk tolerance or time horizon.

But generally speaking, if the market is having a good year, your portfolio should be, too. If it’s not, you may want to point a finger toward yourself.

“The greatest risk is not the volatility of the market but the volatility of your own behavior,” says Daniel Crosby, a behavioral finance expert and founder of the investment management firm Nocturne Capital.

Crosby says psychologists have identified behaviors that can hurt the way we invest. Here are three that are most likely to drag down your returns, along with strategies to counteract them.

OVERCONFIDENCE LEADS TO OVERTRADING

The vast majority of long-term investors shouldn’t trade frequently; those who do open themselves up not just to more risk but also to increased transaction fees and tax consequences, both of which can drag down returns.

“One of the reasons investors trade more than they should is that they think they know more than they do,” says Terrance Odean, a professor of finance at the University of California, Berkeley,   who researches investor behavior. “They think they have more ability than they have, they end up trading more than they should, and that hurts their returns.”

If you tend to keep an enthusiastic finger on the buy or sell…