BookmarkSubscribeRSS Feed
niladri_routray
Calcite | Level 5

I want amount compounded annually, compounded monthly also amount accrued at monthly level.please help 

niladri_routray
Calcite | Level 5

is there any document which help me calclaute all these financial term in SAS, where I can refer to.

Ksharp
Super User
Search it at wikipedia.org


https://en.wikipedia.org/wiki/Compound_interest


GinaRepole
SAS Employee

ballardw has already given you some good code to get you started above. A lot of what you're looking for can be done through logical calculations using DATA step and DO loop syntax. Some functions may come in handy, as well.

 

If you need help with how to use financial functions, or wonder what is available, you can find them here by scrolling down to the Finance section.

 

If you have access to or are interested in any formal SAS training on this topic, the SAS Programming 2 course covers almost exactly this topic in Chapter 7.1 & 7.2.

ballardw
Super User

Perhaps

data _null_;
   year=0.07;
   month=0.07/12;
   principal = 50000;
   do i=1 to 25;
      year_amount=compound(principal,.,year,i);
      int = year_amount-principal;
      put 'year=' i ' year amount=' year_amount f14.2 +1  "Accumulated interest=" int f14.2; ;
   end;

   do i=1 to 25*12;
      month_amount=compound(principal,.,month,i);
      int = month_amount-principal;
      put 'month=' i ' month amount=' month_amount f14.2 +1 "Accumulated interest=" int f14.2;
   end;
run; 


SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 19 replies
  • 3329 views
  • 7 likes
  • 7 in conversation