04-18-2017 08:04 AM
In a fixed term deposit of 25 years calculate the total amount at the end of term with initial
amount of 5,00,00 and annual interest rate of 7% i) compounded annually II) compaunded monthly. show the amount accured at monthly level.
04-18-2017 08:17 AM
Please show the code you already tried, and where the result differed from your expected result.
04-18-2017 08:22 AM
My hourly fee for doing other people's work is 50 Euros. Can I send you my IBAN?
04-18-2017 08:25 AM
Hi, I'm afraid your question doesn't sound like or request that essentially is a favor and rather that sounds like an order in a open public technical forum which is unfair. Please rephrase with some courtesy and kindess, you are more likely to get any kind of help you need. I am only suggesting, and do not take this personal. Thank you and have a nice day!
04-18-2017 08:35 AM
I am really sorry for your thoughts. I just started doing programming in SAS, thats why I posted this question and need a clue to start writing code. I did not know the protocol of this forum. If my question hurts anyone in this forum, I am saying sorry for that, no other intention.
04-18-2017 08:54 AM
If you are new to SAS programming, I would suggest that you take the free online Programming 1 course. It will help develop your skills, and hopefully be able to direct more specific question on these forums in the future.
04-18-2017 08:49 AM
In a data step, use a do loop. Set the initial amount before the loop. Calculate the increase in the loop (variable asssignment with simple mathematical formula), and use output to write a record (observation) to the target dataset.
04-19-2017 03:21 AM
If I was right. data _null_; year=0.07; month=0.07/12; do i=1 to 25; year_amount=50000*constant('e')**(year*i); put 'year=' i ' year amount=' year_amount; end; do i=1 to 25*12; month_amount=50000*constant('e')**(month*i); put 'month=' i ' month amount=' month_amount; end; run;
04-19-2017 05:33 AM
Thanks for your reply.
while running the below code, I am getting following output.
but calculation formula used in the code for year_amount and month_amount is differenet while output is same for both year_amount and month_amount.
04-19-2017 08:15 AM
So you want sparse compound interest ,not continuous compound. data _null_; year=0.07; month=0.07/12; year_amount=50000; do i=1 to 25; year_amount=year_amount*(1+year); put 'year=' i ' year amount=' year_amount; end; month_amount=50000; do i=1 to 25*12; month_amount=month_amount*(1+month); put 'month=' i ' month amount=' month_amount; end; run;