turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Do-loop question

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-20-2017 02:17 PM

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 .

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to mehak

10-20-2017 02:59 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to ballardw

10-21-2017 01:19 AM - edited 10-21-2017 01:20 AM

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to mehak

10-20-2017 03:02 PM

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 .

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

10-21-2017 01:16 AM

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;