One of the worst mistakes investors make is selling stocks for the wrong reasons. Don't get me wrong -- there are plenty of good reasons to sell stocks, and even the most buy-and-hold-oriented investors sell stocks every so often. However, it's important to know the difference between a good reason to sell and a bad one.

With that in mind, here are three awful reasons why investors sell stocks, and five examples of situations where selling makes sense.

Two people looking at a stock chart on a computer screen.

Image Source: Getty Images.

Bad Reason No. 1: Because the stock went down

This is perhaps the single worst reason to sell a stock -- simply because the price went down. If a stock's price drops but your initial reasons for buying it still apply, it should be looked upon as an opportunity, not a reason to abandon ship. Unfortunately, many investors will sell their shares "before the stock goes down any further."

As a personal example, one stock I feel has serious long-term value potential is General Electric. Without getting too far in depth, I'll say that I generally agree with the excellent discussion my colleague Lee Samaha recently published. So, I picked up some shares when it was trading for approximately $10, and the stock subsequently plunged to the low $8 range. Nothing had changed -- so I added more to my position, enjoying the 15% discount. And if it goes down further, I may even add a little more.

Bad Reason No. 2: Because the stock went up

To be fair, it can certainly be tempting to sell stocks that go up, in order to lock in your profits. However, like in the last point, this is only true if your reasons for buying the stock no longer apply.

I made this mistake with Telsa and it has haunted me since. In 2011, I bought shares in Tesla's IPO for about $23. At the time, the Model S hadn't entered production and the market wasn't sold on the idea of a mainstream electric-car company yet. Well, in 2012 the Model S shocked the automotive world by being named Motor Trend's Car of the Year and the stock soared. When the stock reached about $58 per share by mid-2013, I decided to cash in. As I write this, Tesla trades for about $350.

I learned a valuable lesson the hard way. Nothing had fundamentally changed. If anything, my reasons for buying the stock in the first place had been validated.

Now, if you think the stock has become too expensive based on valuation, that's another matter. For example, if you determine that a stock should trade for 20 times earnings and it jumps up to a P/E multiple of 30, it can be a good reason to head for the exits. However, price is just a number and a major price swing in either direction isn't a good reason to sell all by itself.

Bad Reason No. 3: Temporary business headwinds

Stocks fall on bad news, but as a long-term investor, it's important to determine whether news will have a lasting impact on a business, or if it's just a temporary headwind.

One of my favorite stocks, Square, recently fell about 30% from its all-time high. The main catalyst? News that highly regarded CFO Sarah Friar had decided to leave the company.

This is certainly bad news. Friar has been an amazing CFO, and investors weren't expecting her to leave. However, Friar's departure doesn't make Square worth 30% less as a business. Finding top talent has been one of CEO Jack Dorsey and his team's strong points, so there's no reason to believe the right person won't be found for the job. Plus, Square's growth and massive market opportunity hasn't changed.

Good reasons to sell stocks

Now that we've looked at some of the bad reasons to sell stocks, let's take a quick look at five good reasons to sell. To be clear, this isn't an exhaustive list, but it is meant to illustrate the difference between the right and wrong ways to approach selling stocks in your portfolio.

Good Reason No. 1: I need the money

Perhaps the most obvious reason to sell a stock is because you need the money. Personally, I sold some stocks that I otherwise would have kept in order to pay for my wedding several years ago. If you need the money to cover expenses like your kids' college tuition, home renovations, or simply to help with day-to-day expenses, it can be a good reason to sell stocks.

Good Reason No. 2: Something has fundamentally changed with the investment thesis

I alluded to this one in my discussion of the bad reasons to sell. It's acceptable to sell a stock when the price moves dramatically if the reasons you bought the stock changed significantly as well. For example, if you buy a dividend stock in order to enjoy a nice income stream and the company decides to cut its dividend, that can be justification for selling.

Good Reason No. 3: The company is being acquired

If one of your stocks has accepted an offer to be acquired, chances are good that the stock's price has shot up to a level that's close to the acquisition price. This is generally a profitable event for shareholders, but also limits future potential.

For example, let's say that one of your stocks is trading for $70 and accepts a takeover offer for a price of $100 per share. Then the shares shoot up to $95. This can be a good reason to take your profits and move on.

Good Reason No. 4: Rebalancing or diversifying your portfolio

Portfolio rebalancing is something smart investors do from time to time. As a basic example, let's say that you own $5,000 each of a tech stock, a bank stock, and a healthcare stock, so each makes up about 33% of your portfolio. Well, if the tech stock doubles while the other two remain the same, it will then make up 50% of your portfolio's value. To rebalance your portfolio, it could make sense to sell some of the tech stock and buy more of the other two.

Good Reason No. 5: A tax break for pursuing more attractive opportunities

Finally, it can make sense to sell losing stock positions in order to benefit from a tax deduction if and only if you aren't as positive on the stock's long-term prospects as you once were and you feel that your capital could be better deployed somewhere else. This strategy is known as tax-loss harvesting and can be a highly effective way to reduce or even eliminate capital gains taxes.

Matthew Frankel, CFP owns shares of General Electric and Square. The Motley Fool owns shares of and recommends Square and Tesla. The Motley Fool has the following options: short January 2019 $80 calls on Square. The Motley Fool has a disclosure policy.