I am looking for a solution to calculate the LIFO Cost of a stock when I see it from a table of transactions. Any idea how i should start working on this problem?
Data will be arranged in the following way:
Date Side Ticker QTY Execution Px
1/1/2012 B 1 HK Equity 1,000 100
1/1/2012 B 2 HK Equity 4,000 50
1/2/2012 B 1 HK Equity 4,000 101
1/2/2012 S 2 HK Equity 3,000 51
1/3/2012 S 1 HK Equity 2,000 102
1/3/2012 B 2 HK Equity 3,000 49
1/4/2012 S 1 HK Equity 1,000 104
1/5/2012 S 2 HK Equity 1,000 50
Bookmarks