I have a variable with 10 quarters of cash flow. It looks like the following: The variable in SAS is called Axiom. I want to calculate the IRR but I am not sure how. I looked it up but still confused. Thank you,
Date | Axiom |
6/30/2013 | ($17,601,671) |
9/30/2013 | $575,049 |
12/31/2013 | $575,049 |
3/31/2014 | $562,548 |
6/30/2014 | $568,799 |
9/30/2014 | $819,636 |
12/31/2014 | $812,448 |
3/31/2015 | $793,071 |
6/30/2015 | $792,055 |
9/30/2015 | $790,883 |
12/31/2015 | $783,695 |
3/31/2016 | $770,725 |
6/30/2016 | $763,615 |
8/15/2016 | $17,868,981 |
Note:
I make some experiments calculating IRR in Excel and SAS.
The calculation in Excel and SAS equals if make a daily cash flow both in Excel and SAS. I mean you have 6/30/2013 7/1/2013 7/2/2013 ... and so on 365 points per year most of them are missing or equals zero.
Then you can use IRR=IRR(365, of col:);
Oleg.
Hi.
Try the code below.
data have;
infile cards;
informat Date mmddyy10. Axiom dollar10.;
input date axiom;
format date ddmmyy10.;
cards;
6/30/2013 ($17,601,671)
9/30/2013 $575,049
12/31/2013 $575,049
3/31/2014 $562,548
6/30/2014 $568,799
9/30/2014 $819,636
12/31/2014 $812,448
3/31/2015 $793,071
6/30/2015 $792,055
9/30/2015 $790,883
12/31/2015 $783,695
3/31/2016 $770,725
6/30/2016 $763,615
8/15/2016 $17,868,981
;
proc transpose data=have out=have1; var axiom; run;
data want; set have1;
irr=irr(4,of col:);
run;
Note:
I make some experiments calculating IRR in Excel and SAS.
The calculation in Excel and SAS equals if make a daily cash flow both in Excel and SAS. I mean you have 6/30/2013 7/1/2013 7/2/2013 ... and so on 365 points per year most of them are missing or equals zero.
Then you can use IRR=IRR(365, of col:);
Oleg.
Oleg,
It worked perfectly. Thank you for the second email since making a daily data set was the key.
Todd
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.