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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 19 replies
  • 2290 views
  • 7 likes
  • 7 in conversation