BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
toddtodd
Calcite | Level 5

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,

DateAxiom
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
1 ACCEPTED SOLUTION

Accepted Solutions
Oleg_L
Obsidian | Level 7

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.

View solution in original post

3 REPLIES 3
Oleg_L
Obsidian | Level 7

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;

Oleg_L
Obsidian | Level 7

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.

toddtodd
Calcite | Level 5

Oleg,

It worked perfectly. Thank you for the second email since making a daily data set was the key.

Todd

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4373 views
  • 0 likes
  • 2 in conversation