<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: calculate amount (compounded annually &amp;amp; compounded monthly) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440044#M109862</link>
    <description>&lt;P&gt;If you want the annual values, either use a different calculation with only 25 years that would calculate the interest for each year. The Theory of Interest text has the formula (as does google).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you can just take the 12 value from your monthly table, use MOD() function to determine which records are the 12th month.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188601"&gt;@sumitbe139&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Hi Reeza,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Thanks for your response.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;I will definitely take care of that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Yes, I am able to sort some the errors that I made by following the previous responses.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Yes, I need help in calculating the total&amp;nbsp; amount at end of the term , compounded annually&amp;nbsp; as well as compounded monthly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;the amount is 50000,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;annual interest is 7%&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;term deposit is for 25 years.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;for the same I have done this code :&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;it will give the amount at monthly levels.&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;but, I need to figure it out at yearly levels also.&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;data earn;&lt;BR /&gt;capital=500000; /** initial Amount **/&lt;BR /&gt;int_r=0.07/12; /*** for interest at monthly level **/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&lt;BR /&gt;do year=1 to 25; /** for term deposit 25 years **/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;do month=1 to 25*12; /** for monthly levels years multiplied by 12&amp;nbsp; **/&lt;BR /&gt;&lt;BR /&gt;int_m=capital*int_r; /**&amp;nbsp;calculating the interest at monthly levels **/&lt;BR /&gt;capital+int_m;&amp;nbsp; &amp;nbsp;/** the interest that i am earning each month by accumulating at int_m variable&amp;nbsp; &amp;nbsp; **/&amp;nbsp;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Please suggest me on that as well as improvements that I need to do.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;</description>
    <pubDate>Sun, 25 Feb 2018 17:43:12 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-25T17:43:12Z</dc:date>
    <item>
      <title>calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438395#M109301</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all SAS experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am new to base SAS programming,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am calculating amount(compounded annually &amp;amp; compounded monthly), the detailed question is below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;by using DO loops.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the code for 1 part :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data earn_3;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.7;&lt;BR /&gt;&lt;BR /&gt;do year=1 to 25;&lt;BR /&gt;&lt;BR /&gt;earned+(amount+earned)*int_rate;&lt;BR /&gt;&lt;BR /&gt;output;&lt;BR /&gt;	end;&lt;BR /&gt;	run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for second part :&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;data earn_4;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.7;&lt;BR /&gt;&lt;BR /&gt;do month=1 to 25*12;&lt;BR /&gt;&lt;BR /&gt;earned+(amount+earned)*int_rate/12;&lt;BR /&gt;&lt;BR /&gt;output;&lt;BR /&gt;	end;&lt;BR /&gt;	run;&lt;BR /&gt;	&lt;BR /&gt;&lt;BR /&gt;please suggest.&lt;BR /&gt;&lt;BR /&gt;thanks &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 12:07:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438395#M109301</guid>
      <dc:creator>sumitbe139</dc:creator>
      <dc:date>2018-02-25T12:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438399#M109304</link>
      <description>&lt;P&gt;Take a look at the &lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n0ledxl0wyn9jyn12hi34nlpp7ve.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=da" target="_self"&gt;Compound Function&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 14:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438399#M109304</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-02-19T14:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438400#M109305</link>
      <description>&lt;P&gt;There are many posts on the subject on here.&amp;nbsp; Please use the search function:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/forums/searchpage/tab/message?advanced=false&amp;amp;allow_punctuation=false&amp;amp;q=compounded+interest" target="_blank"&gt;https://communities.sas.com/t5/forums/searchpage/tab/message?advanced=false&amp;amp;allow_punctuation=false&amp;amp;q=compounded+interest&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your code, why not do it in one step:&lt;/P&gt;
&lt;PRE&gt;data earn_3;
  amount=500000;
  int_rate=0.7; 
  do year=1 to 25;
    earned=earned+(amount+earned)*int_rate;
    do month=1 to 12;
      earned_month=earned_month+(amount+earned)*(int_rate/12);
    end;
  end;
run;
&lt;/PRE&gt;
&lt;P&gt;Something like that.&amp;nbsp; Always put the assignement in, i.e. the variable before the =, also good idea to check the brackets as order of precedence might spoil your equation (i.e. calculations in brackets are resovled first, then in order of operator).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 14:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438400#M109305</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-19T14:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438404#M109307</link>
      <description>&lt;P&gt;thanks for suggesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but its not&amp;nbsp; working as desired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code for the same is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data earn_4;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.07;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do year=1 to 25;&lt;BR /&gt;	interest_y=amount*int_rate;&lt;BR /&gt;	amount+interest_y;&lt;BR /&gt;	do month=1 to 25*12;&lt;BR /&gt;	interest_m=amount*(0.07/12);&lt;BR /&gt;	amount+interest_m;&lt;BR /&gt;	output;&lt;BR /&gt;	end;&lt;BR /&gt;	end;&lt;BR /&gt;	run;&lt;/PRE&gt;&lt;P&gt;it giving numbers in exponential form.&lt;/P&gt;&lt;P&gt;please suggest.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 15:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438404#M109307</guid>
      <dc:creator>sumitbe139</dc:creator>
      <dc:date>2018-02-19T15:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438409#M109309</link>
      <description>&lt;P&gt;One change you will certainly want to make ... an interest rate of 7% should be 0.07, not 0.7.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than that, why do you say that your programs are inadequate?&amp;nbsp; What needs to be fixed?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 14:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438409#M109309</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-19T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438410#M109310</link>
      <description>&lt;P&gt;"but its not&amp;nbsp; working as desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please suggest. "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest posting some information about what is "not working".&amp;nbsp; Start by providing some test data in the form of a datastep, then show what the output you want is.&amp;nbsp; Show the code you are using.&amp;nbsp; There are a lot of posts under that link I have provided, have you read those and tried to implement the provided solutions?&lt;BR /&gt;"&lt;SPAN&gt;but I have to do it by using DO LOOPS only." - is this some sort of homework assignment?&amp;nbsp; If not use the tools provided.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 14:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438410#M109310</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-19T14:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438422#M109316</link>
      <description>yes please correct me on that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data earn_4;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.07;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do year=1 to 25;&lt;BR /&gt;interest_y=amount*int_rate;&lt;BR /&gt;amount+interest_y;&lt;BR /&gt;do month=1 to 25*12;&lt;BR /&gt;interest_m=amount*(0.07/12);&lt;BR /&gt;amount+interest_m;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Feb 2018 15:28:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438422#M109316</guid>
      <dc:creator>sumitbe139</dc:creator>
      <dc:date>2018-02-19T15:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438463#M109326</link>
      <description>&lt;P&gt;1. Format your code (indents) - makes it easier to spot errors. You'll save the time back in quicker debugging.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Comment your code - so we understand what you're expecting to happen in each line and you can understand it later when studying for your exams.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some starters that show what I mean.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data earn_4;
    amount=500000; *starting amount;
    int_rate=0.07; *annual interest rate;

    do year=1 to 25;
        interest_y=amount*int_rate; * This isn't correct you'll always start from the same amount each loop;
        amount+interest_y;

        do month=1 to 25*12; *this loop is 25*12 years, too many loops;
            interest_m=amount*(0.07/12);
            amount+interest_m;
            output;
        end;
    end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188601"&gt;@sumitbe139&lt;/a&gt; wrote:&lt;BR /&gt;yes please correct me on that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data earn_4;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.07;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do year=1 to 25;&lt;BR /&gt;interest_y=amount*int_rate;&lt;BR /&gt;amount+interest_y;&lt;BR /&gt;do month=1 to 25*12;&lt;BR /&gt;interest_m=amount*(0.07/12);&lt;BR /&gt;amount+interest_m;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 19:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/438463#M109326</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-19T19:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440030#M109855</link>
      <description>&lt;P&gt;I can see you’ve edited the question , but can’t see the original anymore. So I have no idea of what you’re looking for anymore. Is your question answered? If you still need help you’ll have to post way more details. Please don’t edit your question, rather post it as a new response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188601"&gt;@sumitbe139&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Hi all SAS experts,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am new to base SAS programming,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am calculating amount(compounded annually &amp;amp; compounded monthly), the detailed question is below:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;by using DO loops.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the code for 1 part :&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data earn_3;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.7;&lt;BR /&gt;&lt;BR /&gt;do year=1 to 25;&lt;BR /&gt;&lt;BR /&gt;earned+(amount+earned)*int_rate;&lt;BR /&gt;&lt;BR /&gt;output;&lt;BR /&gt;	end;&lt;BR /&gt;	run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for second part :&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;PRE&gt;data earn_4;&lt;BR /&gt;&lt;BR /&gt;amount=500000;&lt;BR /&gt;int_rate=0.7;&lt;BR /&gt;&lt;BR /&gt;do month=1 to 25*12;&lt;BR /&gt;&lt;BR /&gt;earned+(amount+earned)*int_rate/12;&lt;BR /&gt;&lt;BR /&gt;output;&lt;BR /&gt;	end;&lt;BR /&gt;	run;&lt;BR /&gt;	&lt;BR /&gt;&lt;BR /&gt;please suggest.&lt;BR /&gt;&lt;BR /&gt;thanks &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 15:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440030#M109855</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-25T15:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440040#M109859</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Hi Reeza,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Thanks for your response.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;I will definitely take care of that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Yes, I am able to sort some the errors that I made by following the previous responses.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Yes, I need help in calculating the total&amp;nbsp; amount at end of the term , compounded annually&amp;nbsp; as well as compounded monthly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;the amount is 50000,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;annual interest is 7%&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;term deposit is for 25 years.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;for the same I have done this code :&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;it will give the amount at monthly levels.&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;but, I need to figure it out at yearly levels also.&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;data earn;&lt;BR /&gt;capital=500000; /** initial Amount **/&lt;BR /&gt;int_r=0.07/12; /*** for interest at monthly level **/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&lt;BR /&gt;do year=1 to 25; /** for term deposit 25 years **/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;do month=1 to 25*12; /** for monthly levels years multiplied by 12&amp;nbsp; **/&lt;BR /&gt;&lt;BR /&gt;int_m=capital*int_r; /**&amp;nbsp;calculating the interest at monthly levels **/&lt;BR /&gt;capital+int_m;&amp;nbsp; &amp;nbsp;/** the interest that i am earning each month by accumulating at int_m variable&amp;nbsp; &amp;nbsp; **/&amp;nbsp;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Please suggest me on that as well as improvements that I need to do.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 25 Feb 2018 17:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440040#M109859</guid>
      <dc:creator>sumitbe139</dc:creator>
      <dc:date>2018-02-25T17:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440044#M109862</link>
      <description>&lt;P&gt;If you want the annual values, either use a different calculation with only 25 years that would calculate the interest for each year. The Theory of Interest text has the formula (as does google).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you can just take the 12 value from your monthly table, use MOD() function to determine which records are the 12th month.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188601"&gt;@sumitbe139&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Hi Reeza,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Thanks for your response.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;I will definitely take care of that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Yes, I am able to sort some the errors that I made by following the previous responses.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Yes, I need help in calculating the total&amp;nbsp; amount at end of the term , compounded annually&amp;nbsp; as well as compounded monthly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;the amount is 50000,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;annual interest is 7%&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;term deposit is for 25 years.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;for the same I have done this code :&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;it will give the amount at monthly levels.&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;but, I need to figure it out at yearly levels also.&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;data earn;&lt;BR /&gt;capital=500000; /** initial Amount **/&lt;BR /&gt;int_r=0.07/12; /*** for interest at monthly level **/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&lt;BR /&gt;do year=1 to 25; /** for term deposit 25 years **/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;do month=1 to 25*12; /** for monthly levels years multiplied by 12&amp;nbsp; **/&lt;BR /&gt;&lt;BR /&gt;int_m=capital*int_r; /**&amp;nbsp;calculating the interest at monthly levels **/&lt;BR /&gt;capital+int_m;&amp;nbsp; &amp;nbsp;/** the interest that i am earning each month by accumulating at int_m variable&amp;nbsp; &amp;nbsp; **/&amp;nbsp;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;Please suggest me on that as well as improvements that I need to do.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Super-User"&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-message-author-username"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Sun, 25 Feb 2018 17:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440044#M109862</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-25T17:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440051#M109867</link>
      <description>&lt;P&gt;Is there any reason you want to complicate the problem by computing year and monthly results in one step?&amp;nbsp; It can be done, but you need to be careful.&amp;nbsp; For example, looking at just the monthly program that you posted, you are not careful enough.&amp;nbsp; The interior loop now looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do month = 1 to 25*12;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is already inside a loop that has year going from 1 to 25, the interior loop should simply be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do month = 1 to 12;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Moreover, you should actually run the program and inspect the results, to see if they look reasonable to you.&amp;nbsp; You would have caught that change if you had actually checked the results.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 18:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440051#M109867</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-25T18:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: calculate amount (compounded annually &amp; compounded monthly)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440080#M109875</link>
      <description>&lt;P&gt;I presume you are trying to compare differences arising from varying frequency of compounding using the same annual interest rate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want yearly values (as opposed to just the final value), I would recommend a loop for Y=1 to 25.&amp;nbsp; The annual "compounding" is trivial, because it is effectively a simple interest rate.&amp;nbsp; The monthly compounding (within each year) just needs the compound function, applying a rate of .07/12 and number of intervals=12.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  Y=0;
  amounta=50000;
  amountm=amounta;&lt;BR /&gt;  rate=.07;
  output;

  do Y=1 to 25;
    amounta=(1+rate)*amounta;
    amountm=compound(amountm,.,rate/12,12);
    output;
  end;
  format amount: comma12.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, in the real world each amount might be rounded to the nearest penny at the end of the year, so you would nest each calculation in the round function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    amounta=round((1+rate)*amounta,.01);
    amountm=round(compound(amountm,.,rate/12,12),.01);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Finally, if rounding is required monthly, then there is no benefit to the COMPOUND function.&amp;nbsp; You have to make a monthly loop for each year and apply a simple monthly interest:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  do Y=1 to 25;
    amounta=round((1+rate)*amounta,.01);
    do m=1 to 12;
      amountm=round(amountm*(1+rate/12),.01);
    end;
    output;
  end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Feb 2018 22:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-amount-compounded-annually-amp-compounded-monthly/m-p/440080#M109875</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-02-25T22:00:28Z</dc:date>
    </item>
  </channel>
</rss>

