There’s a well-known saying within investment circles which states:

Sell your losers early, but let your winners run

It’s definitely a point worth heeding as it can significantly boost your overall investment performance.

Not letting your mistakes significantly hurt your overall performance often requires quick action; in contrast acting very slowly is the key to maximising the gains from your winners.

However, even if you can successfully resist the urge to take early profits and manage to hold on to a well bought stock long enough to enjoy significant upside, it’s possible a time will still come when you’ll need to consider selling at least part of your holding.

This can occur if you feel the margin of safety has disappeared, or for instance if your analysis suggests a stock has become significantly overvalued.

Here are three stocks which have rallied hard to hit record highs recently. What’s more, in each case an astute investor has been selling into the rally.

Altium Limited (ASX: ALU) – Fund manager Ausbil Investment Management has announced that it has ceased to be a substantial holder in this niche software company.

With Altium’s share price rising 75% in the past year and a staggering 6,555% in the past five years, it’s certainly been an exciting recent journey for shareholders.

While the growth outlook for the firm remains positive, trading on a financial year (FY) 2017 price-to-earnings multiple of 26 times could suggest limited further share price upside.

Xenith IP Group Ltd (ASX: XIP) – Investment bank Schroder has sold down around 1.4% of its substantial holding in the legal services group to 5.5%.

While the provision of intellectual property legal services has escaped largely unscathed from the fall-out of the problems facing Slater & Gordon Limited (ASX: SGH), the increased listed competition could suggest the easy money post Xenith’s initial public offering (IPO) in November 2015 has been made.

Nanosonics Ltd. (ASX: NAN) – Fund manager Allan Gray Australia has been a long term supporter of medical device company Nanosonics.

With the share price surging 55% in the past 12 months, Allan Gray appears to be taking advantage of the rally to lock in some profits having sold down its substantial holding by 1% to 5.5%.

Given the positive growth profile and the fact that Nanosonics’ ultrasound probe disinfector product is still in the early stage of its rollout, Allan Gray will likely be a slow seller of its stake unless it comes to the opinion that the stock is significantly overvalued..

3 Rotten Shares to Sell, and 1 to Buy Today

Are there shares in your portfolio you'd be better off without? After a double-digit rally for the ASX since 2016 lows, investors should be on high alert. You'll find a full rundown below of 3 shares we think you should avoid today plus one top pick worth buying, even if the market turns south and the RBA keeps rates at an "emergency low." Simply click here to uncover these stocks.

HOT OFF THE PRESSES: Motley Fool’s #1 Dividend Pick for 2017!

With its shares up 155% in just the last five years, this ‘under the radar’ consumer favourite is both a hot growth stock AND our expert’s #1 dividend pick for 2017. Now we’re pulling back the curtain for you... And all you have to do to discover the name, code and a full analysis is enter your email below!

Simply enter your email now to receive your copy of our brand-new FREE report, “The Motley Fool’s Top Dividend Stock for 2017.”

By clicking this button, you agree to our Terms of Service and Privacy Policy. We will use your email address only to keep you informed about updates to our website and about other products and services we think might interest you. You can unsubscribe from Take Stock at anytime. Please refer to our https://www.fool.com.au/financial-services-guide">Financial Services Guide (FSG) for more information.

Motley Fool contributor Tim McArthur owns shares in Slater & Gordon Ltd. The Motley Fool Australia owns shares of Altium. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy. This article contains general investment advice only (under AFSL 400691). Authorised by Bruce Jackson.