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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.