Throughout the market’s rocky ride this summer, you heard a chorus of warnings not to panic and sell just because the Dow fell more than 1,000 points. Makes sense. While a selloff may feel like Armageddon, the world has not—at least as of this writing—ever ended following a sudden stock market decline. In fact the broad market always heals in time. And by fleeing you can miss out on spectacular rebounds.
But this doesn’t mean there aren’t good reasons to sell stocks or funds. The trick is knowing what those scenarios are before panic sets in. Here are some of the most common reasons to walk away:
When Things Don’t Work Out
Sometimes your investment thesis just doesn’t develop. Say you grew bullish on energy late last year, after oil prices were cut in half. Good instincts, bad call. Energy funds have been pumping misery this year, falling an average 25%.
Once losses reach that level, you have to think about selling and waiting for the sector to improve before reentering. Why? Understand how the math works: After a 10% loss, stocks need to rebound only 11% to recover. But with a 25% loss, you’ll need a 33% rebound to break even. And at 50%, you’d have to double your gains just to get out of the red. Meanwhile, in a taxable account, losses have real value. You can use them to offset capital gains. If you have more losses than gains, you can deduct up to $3,000 from ordinary income and carry unused losses into future years.
• Caveat: Sometimes it’s not the strategy that’s failing but a fund. Make sure you give it sufficient time—at least three years. And measure it against the right benchmark. Booting a small-company fund because it’s not matching the S&P 500 index of large stocks doesn’t make sense, says Dan Weiner, editor of The Independent Adviser for Vanguard Investors.
When Things Do Work Out
Say you want a 60% stock/40% bond portfolio. Stocks tend to rise when bonds fall and vice versa, so periodically you’ll have to rebalance back to 60%/40% by selling winners.
• Caveat: Wait until your mix is 10 percentage points off target. Rebalance too often and you’ll be trimming your top performers too soon. A Vanguard study found that using a threshold of 10 points produces slightly better long-term results than shifting sooner—without adding much more volatility.
Perhaps the happiest reason to sell: if you hit your savings goal early. Say you need $1 million to retire at 65, but at 60 you’re sitting on seven figures. You may be able to be a bit less aggressive by paring back your stocks. And that should help you sleep easier at night and still retire when you want.
Columnist John Waggoner is the author of three books on Wall Street and investing.
Read next: What Is A Stock?