Greetings,
I would like to calculate XIRR for each closed stock position, ie, where the buy and sell order has been executed. I tried to approach this by using a formula to identify which sell transaction has resulted in a closed stock position. However, I am struggling to generate lot numbers based on this so as to allow me to calculate XIRR for every open / closed position.
To help understand further, in the attached file, Col P refers to the closed position. I would like to get a formula to give me the desired results in Col Q. Currently, the XIRR range I have will generate a result for all transactions. I would like to get separate results for lot1 and lot2, which I believe I should be able to do so if I can get Col Q to be calculated via formula.
Any help would be greatly appreciated.
Kind regards
AGS
Bookmarks