Kite portfolio shows average price and p&l of a stock bought and sold multiple times on FIFO principle. It is fair enough.
However to assess net p&l from a stock it is better to have the overall average price in front. Although detailed p&l statement are already available on console, but still calculation using realised and unrealised p&l is required to get the net picture.
@nithin@siva-reddy would it be possible to have portfolio analysis based on simple average on holdings screen of kite?
for e.g.
Day 1;-buy 100 shares of stock A @ 100rs/share.
Day 2: buy 100 shares of A @ 50rs/share.
i.e. total volume-200
average price-75
p&l: -33% ,[since cmp is 50rs]
Now suppose u sell 100 shares @60rs
then holdings page will display:-
total vol:-100
average:- 50rs/share
p&l:- +20% [cmp-60rs]
this is because the first lot bought @100rs/share is sold off first.
However p&l of +20% is distorted view of net return.
if average price of rs 75/- is kept intact after sell off, we’ll get correct picture of return i.e. -20%.
when u go to console u’ll find :- realised p&l as -40% & unrealised p&l as +20%. based on lot size ,purchase price,and sell price you can get net return.
to avoid all this hassle if we don’t change average price at holdings after sell off , we’ll get the net return.
Hmm… I get what you are saying, but showing an average price wont’ be right. But let me figure if there is anyway to take the P&L average price and show it somewhere on holdings.
I might be missing something but wondering In this case what should be look back, I mean how far we need to go historical, if one is trading the same stock in last 30 sessions, how to handle these?
after someone buys the stock for the first time, thereafter average price should change only with subsequent purchases of the same stock…sell off should not affect average price…
That is exactly what I am saying. If you lock in, we have to not do FIFO when the shares are locked in. It has to be LIFO or FIFO excluding what is locked in. Calculating buy averages is an extremely complex math especially with corporate actions, billions of rows of breakdown, etc. We can’t really make changes on that.
What we are working on though is a tagging feature. You can tag your portofolio to goals/strategies or whatever you want it to be. But the math will still be FIFO to calculate your holding price.