By Victor Chng

Oftentimes, amateur investors only focus on their upside and when is the best time to buy a stock. But you have to remember that buying a stock is only one part of the equation. Unless you plan to hold a stock for its dividends, knowing when to sell a stock is also just as important to making capital gains in the stock market.

There is no point in buying a stock at a bargain, see its price rise all the way up and then witness it come tumbling back down again when the winds change. In this case, all your potential gains are wiped out because you failed to recognise when to sell a stock and capitalise on the opportunity to lock in your profits at the right time.

Sometimes, investors are also not sure when to sell a stock because they are afraid of losing out if the stock price rises some more. Well, besides the fact that no one can accurately predict which way stock prices will go, it is important to remember this: It is better to sell too early, then to sell too late.

When you base your decisions on a consistent investment framework, it is easier to know when to sell a stock by using qualitative factors and valuation metrics rather than hoping that prices will continue to rise.

So let us have a look at the three best times when to sell a stock.

1. When your company is facing strong headwinds

Human emotion is something that everyone has to master in order to become a profitable investor. Sometimes people tend to fall in love with a stock and continue holding on even when it is facing strong headwinds that could make the situation far worse. Let me give you an example.

In June 2014, the news reported that MyRepublic, a local broadband service provider, could become Singapore’s fourth telco. The Singapore government eventually confirmed that it was granting a fourth telco license and the bid was won by TPG Telecom in December 2016. I know everything looks plain and simple in hindsight. But let us rewind to June 2014 when the news broke that MyRepublic had ambitions to be the fourth local telco. At that point, you would have been aware that of the possibility of a fourth telco entering the market.

As we know, Singapore’s telco industry market is already very saturated — the introduction of a fourth telco would mean a price war among the players to win or defend their market share. M1 Limited (M1), being the smallest player in the game, has always competed by advertising lower prices. A fourth telco and the ensuing price war would mean that M1 would be hurt the most as its margins would be squeezed further as it has no moat to defend its market share.

Therefore, if you noted the headwinds moving toward M1, you could have sold your stake even before the fourth telco was approved. If you were wrong and the forth telco never materialised, you would have locked in any gains you had and still have the option to repurchase M1 if you wanted to. But if you were right and the license for the fourth telco was granted (which is the case), then you would have avoided the bloodbath that followed.

2. When Your Stock Is Overvalued

Before you purchase any stock, it is important to calculate its intrinsic value so you have a measure of whether a stock is cheap or expensive compared to its value. When a company grows and becomes more successful, its intrinsic value should grow in tandem since the company’s fundamentals have improved.

Like Benjamin Graham’s famous quote: “In the short run, the market is a voting machine but in a long run, it is a weighing machine”. This means that over the long term, the share price of a company will eventually match its intrinsic value. However, there will be times when A company’s share price significantly exceeds its intrinsic value, and this is when you should consider selling the stock. Let me give you an example.

Major Cineplex (Major) is the largest cinema operator in Thailand with about 70 percent market share in Bangkok. In 2013-2014, Thailand was facing (another) political crisis with the populace protesting on the streets. This crisis caused most Thai stocks to fall in price. We took this opportunity to invest in Major Cineplex which was trading at around 10 times EV/EBITDA (Enterprise Value over Earnings Before Interest, Tax, Depreciation and Amortisation). At this valuation, it was a bargain for a company which had a dominant market share and strong growth drivers.

After the country stabilised, Major’s valuation skyrocketed and reached an all-time high of 17 times EV/EBITDA in 2017. We could have held on to our stake, but we decided to sell our position as we viewed that the share price had gone far above its intrinsic value. We locked in 105 percent in gains and Major’s share price has come down since.

3. When Your Investment Thesis Is No Longer Valid

An investor should always form an investment thesis why you decide to buy a particular stock. Is it because it is significantly undervalued? Is it because it has considerable growth potential? Or is it because it is a resilient company with a wide economic moat that? It can any of these reasons and more.

Selling a stock comes when your initial investment thesis no longer valid – the stock was revalued upwards, its growth drivers have permanently stalled, there’s a structural change in the industry, etc. In this case, you want to sell the stock to limit your losses or lock in your gains.

For example, we invested in Nera Telecommunications (Nera) in 2013 because its payment solutions segment was growing strongly. The segment also posted stable recurring revenues compared to Nera’s infocomm project-based business segment. We projected the payment solutions segment to become Nera’s main revenue contributor which would give the stock a higher valuation due to its recurring revenues.

In 2016, Nera surprisingly announced the sale of its payment solutions business to Ingenico for S$88 million. This meant our original reason for investing in Nera (i.e. riding on its payment solutions growth) was no longer valid and it was time to exit our position. In this case, I actually missed the best time to sell my stock, but I still ended up with a positive overall return and walked away with a very nice special dividend.

So monitor the companies on your portfolio from time to time, and if the news informs you of something that may affect your investment, take the time to evaluate and decide if it’s time to sell your investment.

This article originally appeared on The Fifth Person.