1.if i invest $5000 each year in account . after 15 yrs annual rate=10% and compound annual interest rate=10%.
2.also if a fixed term deposit of 25 yrs . Calculate total amount end of term with initial amount 1,00,000. annual interest rate 7%
.find compounded annually and monthly .
Sounds like homework so I'll provide a couple hints: Functions available in data step coding: SAVING
Note that many of the finance functions have 3, 4 or more parameters. The answer depends on which one you leave as missing.
Express interest as decimals: 0.05 instead of 5%, and pay attention to compounding intervals.
is this the correct way to solve 1 st one
data work.invest;
do month=1 to 15;
Capital+5000;
capital+(capital*.10);
output;
end;
run;
2. data work.invest;
amount=500000;
rate=0.07;
do month =1 to 25 ;
earned+5000;
output;
end;
run;
title 'output dataset :Compounded monthly';
run;
proc print data=work.invest;
title 'output dataset :Compound Monthly';
run;
/* Compounded ANNUALLY */
data work.invest;
amount=500000;
rate=0.07;
do year =1 to 25;
earned+5000;
earned+(amount+earned)*rate;
output;
end;
run;
title 'output dataset :Compounded annually';
run;
proc print data=work.invest;
title 'output dataset :Compound annually';
run;
That's your homework. What's your question for us?
Note: that it's less likely to get an answer to homework style questions without showing any effort.
@mehak wrote:
1.if i invest $5000 each year in account . after 15 yrs annual rate=10% and compound annual interest rate=10%.
2.also if a fixed term deposit of 25 yrs . Calculate total amount end of term with initial amount 1,00,000. annual interest rate 7%
.find compounded annually and monthly .
is this the correct way to solve 1 st one
data work.invest;
do month=1 to 15;
Capital+5000;
capital+(capital*.10);
output;
end;
run;
2.
data work.invest;
amount=500000;
rate=0.07;
do month =1 to 25 ;
earned+5000;
output;
end;
run;
title 'output dataset :Compounded monthly';
run;
proc print data=work.invest;
title 'output dataset :Compound Monthly';
run;
/* Compounded ANNUALLY */
data work.invest;
amount=500000;
rate=0.07;
do year =1 to 25;
earned+5000;
earned+(amount+earned)*rate;
output;
end;
run;
title 'output dataset :Compounded annually';
run;
proc print data=work.invest;
title 'output dataset :Compound annually';
run;
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.
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.