![]() |
Interpolation with non-linear information... FIFO
I am trying to interpolate between data. Imagine the following situation:
Stock trade: Trade Price: Consideration: FIFO Cash: +100,000 2.50 250,000 0 +50,000 2.75 137,500 0 +225,000 3.00 675,000 0 Then I sell: -184,250 @ 3.40 The resultant cash that is due from these trades is calculated on a FIFO basis (First In First Out). So the calculation would be (100,000 *(3.40-2.50) + 50,000 *(3.40-2.75) + 34,350 * (3.40-3.00)) = 136,240. But I want to add a column that does this automatically. I.e.: Stock trade: Trade Price: Consideration: FIFO Cash: +100,000 2.50 250,000 0 +50,000 2.75 137,500 0 +225,000 3.00 675,000 0 -184,250 3.40 626,450 +136,240 The cash line would also need to be able to go the other way... i.e. if had sold first and then hit a buy, what is the cash flow on a FIFO basis. Any ideas how I can do this?? |
All times are GMT +1. The time now is 02:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com