I have a Panadas dataframe which encompasses 4 columns (company, price today, cash flow y1, cash flow y2, cash flow y3 (i.e. a terminal value)):
Code | Price | 0 | 1 | 2 |
---|---|---|---|---|
GOOGL-US | -2380 | 0 | 0 | 4074.94 |
AMZN-US | -3265 | 0 | 0 | 5765.09 |
FB-US | -327 | 0 | 0 | 513.819 |
etc for ~100 tickers
Is there a way to do a simple IRR calc using the data from the columns price, 0, 1, 2 as at annual periods (i.e. t0, t1, t2, t3)
?
Thank you!