It’s an investor’s mantra: Rebalance your portfolio regularly. But it may be worth rethinking that mantra.

The case for rebalancing is pretty straightforward. Over time, assets whose prices rise account for a growing proportion of a portfolio’s overall value, and those whose prices fall amount to a shrinking share of the portfolio. Rebalancing, by selling securities that have risen in value and buying assets whose value has declined, restores the investor’s desired weighting of various assets within the portfolio.

“For some, it is an emotional anchor,” says Richard M. Rosso, director of financial planning at wealth-management company RIA Advisors.

Part of the logic behind rebalancing is that it maintains the level of risk the investor is comfortable with, by ensuring that the portfolio doesn’t skew too far beyond the desired balance between relatively safe investments like highly rated bonds and riskier assets like stocks.

Share Your Thoughts

How do you handle rebalancing your portfolio? Join the conversation below.

Rebalancing also is often seen by advisers and investors as a formula for consistent returns, based on the idea that returns on different asset classes tend to revert to historical norms: If stocks outperform their historical average this year, then the chances are that future returns will be lower, and vice versa. So, by this way of thinking, since stocks have outperformed other assets recently, it would make sense to sell some and invest the proceeds in assets that have performed less well. But this strategy has holes.

While a strict rebalancing routine may help some investors feel comfortable with their portfolio, that anchor may be holding them back, Mr. Rosso says. “Rebalancing is sometimes counted as a way to get better performance, but most methods don’t provide that,” he says. “I have yet to see a study that shows that it improves your returns.”

Indeed, sometimes rebalancing can mean missing out on big returns. In the 12 months through April 30, SPDR S&P 500 ETF (SPY), which tracks the S&P 500 index, gained 48%, not including dividends. Investors who rebalanced in the middle of that period by selling broad stockholdings gave up substantial returns. And if they bought bonds in that rebalancing, they probably didn’t make much on that investment. The iShares Broad USD Investment Grade Corporate Bond ETF (USIG), which holds a basket of high-quality company bonds, gained 2.9%, over the 12 months through April, excluding interest payments, and slumped in the second half of that period.

Opposite of the traders’ adage

In fact, rebalancing goes directly against a maxim used by many professional investors and traders: Cut your losers short and let your winners run. That means if you own securities that are performing well, you retain them., and you dump securities that have fallen behind or failed to rally as expected.

Over the past year or so, the traders’ maxim has worked far better than a regular rebalancing by asset class. Stimulus spending by the federal government and the low-interest-rate policy of the Federal Reserve have made relatively risky assets such as equities winners and left bonds with little to offer in the way of returns. “Unless you count cryptocurrencies, the only game in town is stocks,” Mr. Rosso says. “Your winners aren’t just running, they are sprinting.”

But this is where risk comes back into play. Leaving too much money invested in a frothy market can expose an investor to the possibility of a catastrophic loss. That can make life tricky for advisers like Mr. Rosso when they scale back a client’s holdings in a bull market. “I have to help investors who are in a strong greed cycle,” he says. “They ask: Why did you sell this?”

Buying out-of-favor assets

In the end, the argument against simple, routine rebalancing is mostly that it isn’t nuanced enough—that adjusting a portfolio along the lines of broad asset classes like stocks and bonds at set intervals might be too blunt an instrument to improve performance. However, rebalancing by picking out-of-favor sectors within those broad asset classes when opportunities present themselves can be productive, says money manager Adam Johnson, author of the Bullseye Brief financial newsletter.

“I’m generally a contrarian,” Mr. Johnson says. “If I were to define rebalancing, I would allocate capital to where I can make the most money, which means buying the stuff that other people hate.”

For instance, in 2018, Mr. Johnson was bullish on semiconductor stocks, which were then out of favor and remained so until the second quarter of 2019, when they began an epic rally. “They went nowhere until they were hot,” he says. “I can’t tell you how depressing it was to buy semis in 2018,” he says, but his patience paid off.

In managing an investor’s portfolio, Mr. Johnson continuously rebalances based on predetermined price targets for individual securities. “Let the market tell you when to rebalance,” he says.

Mr. Constable is a writer in Edinburgh, Scotland. He can be reached at reports@wsj.com.