Buy recommendations are prevalent and stem from a wide variety of sources, including investment newsletters, analysts, stockbrokers and investment managers. However, few offer much advice on when it is best to sell a stock. Here are five tips on when it might be time to sell.

It Hits Your Price Target

When initially buying a stock, astute investors establish a price target, or at least a range in which they would consider selling the stock. Each stock purchase should also include an analysis on what the stock is worth, and the current price should ideally be at a substantial discount to this estimated value. For instance, selling out of a stock when it doubles in price is a worthy goal and implies that an investor thinks it is undervalued by 50%.

It is difficult for even the most seasoned investor to come up with a single price target. Instead, a range is more realistic, as is deciding to sell off the position as it is rising, in order to lock in gains.

A Deterioration in the Fundamentals

Along with keeping track of a firm's stock price after establishing a price target, monitoring the performance of the underlying business is important. A key reason to sell is if the business fundamentals decline. In an ideal world, an investor will realize a deterioration in sales, profit margins, cash flow or other key operating fundamentals before the stock price starts to decline.More experienced analysts may read deep into the financial statements, such as filing footnotes that other investors are more likely to miss.

Fraud is one of the more serious fundamental flaws. Investors who were early to spot financial fraud from the likes of WorldCom, Enron and Tyco were able to save substantial sums as the share prices of these respective firms plummeted.

A Better Opportunity Comes Along

Opportunity cost is a benefit that could have been obtained by going with an alternative. Before owning a stock, always compare it with the potential gains that could be obtained by owning another stock. If that alternative is better, then it makes sense to sell the current position and buy the other.

Accurately identifying opportunity cost is extremely difficult, but could include investing in a competitor if it has equally compelling growth prospects and trades at a lower valuation, such as a lower price to earnings multiple.

After a Merger 

The average takeover premium, or price at which a company is bought out, generally ranges between 20-40%. If an investor is lucky enough to own a stock that ends up being acquired for a significant premium, the best course of action may be to sell it. There may be merits to continuing to own the stock after the merger goes through, such as if the competitive position of the combined companies has improved substantially.

However, mergers have a lousy track record of being successful. Additionally, it can take many months for a deal to be completed. Therefore, from an opportunity cost perspective, it can make sense to find an alternative investment opportunity with better upside potential.

After Bankruptcy

This may seem obvious, especially because, in the vast majority of cases, a bankrupt company becomes worthless to shareholders. However, for tax purposes it is important to sell or realize the loss so that it is used to offset future capital gains, as well as a small percent of regular income each year.

The Bottom Line

The decision to sell a stock is a combination of art and science. There are a number of considerations to make, such as those above, when deciding if stock gains have run their course or are likely to continue. A common-sense strategy is to sell as a stock rises in order to lock in gains over time.