Man deliberately pushing button on smartphone © Balavan, Getty Images

Knowing when to cut ties to a stock can be tough, especially in a bull market. One common piece of advice is to sell when the reason you invested in a company is no longer valid -- for instance, if the great product that attracted you to a stock turns out to be a dud.

Beyond that, the sell decision depends, in part, on your style. So here we offer guidelines, based on the type of investor you are.

You're a bargain hunter

If you prefer stocks with low price-earnings ratios, use P/E targets to help you determine when to sell.

Tom Forester, manager of Forester Value Fund (FVALX), buys stocks with P/E's that are 20 to 40 percent less than the average for a company's sector. He sells when a stock's P/E begins to rise above the sector average.

Using this approach, you might want to keep an eye on Microsoft (MSFT). After gaining more than 40 percent since April 2013, the stock now sells at about 15 times estimated calendar 2014 earnings, the same as for the tech sector overall. If Microsoft's P/E climbs much more, it may be time to look for better value elsewhere. (Microsoft owns and publishes MSN Money.)

You like growth on the cheap

Let's say you're a classic growth-at-a-reasonable price, or GARP, investor and prefer to buy when a company's P/E is below its earnings growth rate. If so, watch out if the P/E exceeds the growth rate by 50 percent or more.

Consider McKesson (MCK). On the surface, the drug distributor does not look like much of a bargain. Its P/E, based on estimated calendar 2014 earnings, is 17, about the same as the P/E for most large health care companies. But analysts expect McKesson's earnings to grow 19 percent annually over the next few years. Projected growth is above the P/E, giving the stock room to run. Don't unload.

If you hold Illumina (ILMN), by contrast, you should think about selling. Shares of the biotech company sell for 67 times forecasted 2014 earnings, nearly four times the firm's estimated long-term earnings growth rate of 18 percent per year.

You invest for yield

A dividend cut is often a cue to sell. But the time to get out is well before a cut occurs. So keep an eye out for hints of trouble.

One worrisome sign is when a company's payout ratio (the percentage of earnings it pays out as dividends) is greater than 70 percent. Growing debt is also a red flag. And if a dividend cut comes out of the blue, ask yourself why the company cut the payout. Can the circumstances that led to the reduction be easily fixed?

You like growth stocks

If you fell in love with a company because of its great growth prospects and the firm is no longer expanding, you should unload.

Consider Apple (AAPL). Over the ten years that started in 2003, earnings exploded from 10 cents per share to $44.15, and the stock price rose by a factor of 110. But starting in late 2012, Apple reported four straight quarters of year-over-year profit declines. Its bruised shares may attract bargain hunters, but Apple's days as one of the world's preeminent growth stocks appear to be over.

Click here to become a fan of MSN Money on Facebook

More from Kiplinger