Console FIFO calculation Bug

Console calculation of FIFO(First In First Out) of shares buy/sell is buggy.
Please refer to circular
https://incometaxindia.gov.in/communications/circular/910110000000000355.htm

It illustrates in detail how FIFO works. Basically 2 things -

  1. FIFO is per demat account. Two separate demat account of a person would have separate FIFO.
  2. FIFO depends upon entry/exit of shares to demat account. Their purchase date is immaterial. For normal operation, purchase date would be similar to entry date. But not always. E.g. Off-market transfer/dematerialisation of physical certificate.

Now, Console trade calculation assumes purchase date as entry date always. So, if there is any off-market transaction, it totally messes up the entry.
An example -

  1. ICICIBANK - Buy- 1000 shares - 2/3/2015(Date of purchase) - 200/- (presume cost)
  2. ICICIBANK - Buy - 500 shares - 1/1/2016 - 300/-
  3. ICICIBANK - Buy - 800 shares - 2/1/2017 - 400/-

Now, an off-market transaction Entry of 300 shares happened whose purchase date is 10/5/2013. So now, 4th entry

  1. ICICIBANK - Buy - 300 shares - 10/5/2013 - 100/- (entry into demat date 24/6/2017)
    Now sell -
  2. ICICI Bank - SELL - 300 share - 1/1/2018 - 500/-

Which entry is sold ? According to IT Dept, First entry of 2/3/2015 is sold. But because console is based upon purchase date FIFO, it considers 4th entry sold(since purchase it at earliest date). So, now I need to pay wrong HIGH Capital gain tax .

Some funny situation happens too. What if Sell happened before off-mrket entry into demat (5 happened before 4) ? Once you update the entry purchase date, Console thinks that the newly entered shares in demat to be already sold, since its purchase date is earliest !!! Sold before entry !!!

So, If we want to save Capital gain tax and want to sell the latest purchased shares ( ICICIBANK - Buy - 800 shares - 2/1/2017 - 400/-) . IT dept doesn’t allow that directly.
However, if you transfer the total 1500 shares to another demat account owned by you, according to IT Dept circular it is exit of (1) and (2) according to FIFO.
Now you sold the 800 shares. This is (3) sold. So, now purchase rate of sold shares would be considered 400/- . We are happy to reduce capital gain.
Now, you can bring back 1500 shares into demat and manually tell the console the correct purchase date. It should all work fine, BUT BUT BUT
once the 1500 shares hit the demat and purchase price updated, console suddenly starts thinking(because of older purchase date) that 800 shares out of 1500 sold!! Means those shares sold, which were not there in demat even!!
COMPLETLEY SCREWS UP Tax calculation. Manually doing all tax calculation of this after an year is not possible for me.
Just fix the console to consider entry date and not purchase date for FIFO. Probably Database designer forgot to create database column for Entry date separate from purchase date. It can be easily added.
@nithin

Are you specifying the current date as the purchase date for these 1500 shares?
(or some old original purchase date?)

(one cannot specify the previous original purchase date now,
as that is no longer relevant after one sold/transferred these 1500 shares,
even to another demat account that one owns, right?)

Can you share a link to this IT-circular you refer to
and any specific clause(s) that lead you to believe this is the case?

From the circular

5. Section 45(2A) stipulates that in the case of securities held in dematerialised form, for determining ‘date of transfer’ and ‘period of holding’, the FIFO method would be applicable. FIFO method is generally used to determine the value of any item moving out of a stock account and those remaining in stock at any point of time. When applied to an account holding dematerialised stock, it implies that, out of the existing holdings, the item that first entered into the account is deemed to be the first to be sold out. However, once a sale is linked with an earlier purchase, for determination of their ‘date of transfer’ and ‘period of holdings’, Board’s Circular No. 704 would be applica­ble. That is to say that the relevant contract notes as explained in Circular No. 704 will have to be referred to, for ascertaining the cost of the security sold and the date of transfer.

Hmmm… checking on this.

@TheGouda + +

1 Like

We’re making the changes to accommodate FIFO logic for off market transfers. Any exit before transfer date won’t be matched with the discrepant buy entry transferred shares. We’'ll update once it is live.

So, zerodha takes into account the feedback from users and makes changes to accomodate it .
Nice to know it.

What does this essentially mean if we use entry date?
Long term holdings after off-market transfer become short term holdings in the second demat?

Demat Entry date and Share purchase date are different things. When you do off-market transfer, it only changes FIFO. Rest remains same. It means purchase date of those shares would remain same irrespective of to whom and for how many times you transferred, unless you do actual sale.

Entry date is about when it entered a specific demat account. Purchase date is about when it was purchased. FIFO concerns demat entry date for that Demat account.

1 Like

Yes, got it, i was over thinking.
Basically, sort FIFO, then using correct FIFO eligibilty, determine its purchase date and price and compute gains and whether its STCG or LTCG

If I have overnight position in INDEX OPTIONS and I trade using MIS for same strike price.

Does overnight position option will sell first ?

T DAY : NRML BUY 100 QUALITY @ 200 INR
T + 1 : MIS BUY 100 Q @ 50 AND SELL @80

First 100 quantity bought on T day will square of ? and buying price will be adjusted for overnight position ?