I want amount compounded annually, compounded monthly also amount accrued at monthly level.please help
is there any document which help me calclaute all these financial term in SAS, where I can refer to.
Search it at wikipedia.org https://en.wikipedia.org/wiki/Compound_interest
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.
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.