A quantitative approach to decide when to switch between stock

This is one of the question that was bugging me some month back.

Suppose I am sitting with a 80% short term gain in a stock A. Now I found another stock B, which is expected to give me 15% extra gain in a year timeframe (as compared to A). The question is should I go for it.

When though without thinking anything, it seems a buy. But when one consider the 15% ST tax, plus 1.5% switching brokerage cost, plus 10% of margin of safety, this doesn’t seem a good deal.

Buying price 100, gain 80, ST tax 9, Switching cost ~3 ==> Total proceed = 168. Effective loss because of switch 12/150 = 6.7%. At a 10% margin of safety, this doesn’t look so good.

This is the final output for decision graph without and with 10% margin of safety.


1). This one is for the case of short-term profit. For long term profit the expected delta is (Switching cost + Margin of safety)

2). This one assumes you have some short term gain is your kitty for negative profit case

3). This one is time agnostic. If you have just 7 days to convert your ST gain to LT gain, this sheet is not for you.

Thinking in terms of opportunity cost. Only switch when a stock is better than the held stock. It doesn’tneed any more pondering on tax. Also if the held stock is bought by mistake and still in some profit, one must switch to another.Its better to catch the correct train to reach the destination, otherwise we may need to board on another train and may cost more in our journey.