<?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: Cash Flow and Changing Rate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476963#M286138</link>
    <description>&lt;P&gt;Thanks, Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, right~&amp;nbsp;it's not a typical cash flow logic. It's a special logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find "x" value with RETAIN statements??&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2018 00:23:28 GMT</pubDate>
    <dc:creator>YoungSun</dc:creator>
    <dc:date>2018-07-11T00:23:28Z</dc:date>
    <item>
      <title>Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476826#M286135</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to&amp;nbsp;make code with some cash flows and rates data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is as follows&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Period&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CF&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rate&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.04&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.05&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.06&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inv : 2,000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get "x" value like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2,000 = 1,200*(1-0.04*x) + 1,100*(1-0.04x)*(1-0.05x) + 1,000&lt;SPAN&gt;*(1-0.04x)*(1-0.05x)&lt;/SPAN&gt;*(1-0.06x)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use SAS Enterprise Guide that doesn't include proc optmodel, proc iml.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help me out??&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 14:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476826#M286135</guid>
      <dc:creator>YoungSun</dc:creator>
      <dc:date>2018-07-10T14:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476844#M286136</link>
      <description>&lt;P&gt;You can do this with a data step and a RETAIN.&lt;/P&gt;
&lt;P&gt;But are you sure your logic as shown is correct or what you want? From what I know of cash flow logic, your formula doesn't look correct.&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/220232"&gt;@YoungSun&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to&amp;nbsp;make code with some cash flows and rates data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data is as follows&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Period&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CF&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rate&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.04&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.05&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.06&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inv : 2,000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to get "x" value like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2,000 = 1,200*(1-0.04*x) + 1,100*(1-0.04x)*(1-0.05x) + 1,000&lt;SPAN&gt;*(1-0.04x)*(1-0.05x)&lt;/SPAN&gt;*(1-0.06x)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use SAS Enterprise Guide that doesn't include proc optmodel, proc iml.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could anyone help me out??&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&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;</description>
      <pubDate>Tue, 10 Jul 2018 15:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476844#M286136</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-10T15:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476854#M286137</link>
      <description>Your title says Cash Flow but this looks like discounted value or present value calculation.</description>
      <pubDate>Tue, 10 Jul 2018 15:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476854#M286137</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-10T15:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476963#M286138</link>
      <description>&lt;P&gt;Thanks, Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, right~&amp;nbsp;it's not a typical cash flow logic. It's a special logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I find "x" value with RETAIN statements??&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 00:23:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476963#M286138</guid>
      <dc:creator>YoungSun</dc:creator>
      <dc:date>2018-07-11T00:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476970#M286139</link>
      <description>&lt;P&gt;I interpreted your question incorrectly. This is a problem for NLIN or possibly PROC OPTMODEL. It's also basic math, but that's rusty for me these days :). &amp;nbsp;I believe IML would also work. Do you have the licenses for SAS/IML and SAS/OR?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can check with:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc product_status;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/220232"&gt;@YoungSun&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, Reeza&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, right~&amp;nbsp;it's not a typical cash flow logic. It's a special logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I find "x" value with RETAIN statements??&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 01:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476970#M286139</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-11T01:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476974#M286140</link>
      <description>&lt;P&gt;I don't have a license for IML or OR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll check the procedure you recommended and if you don't mind I'll ask you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your kindness.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 02:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476974#M286140</guid>
      <dc:creator>YoungSun</dc:creator>
      <dc:date>2018-07-11T02:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476983#M286141</link>
      <description>&lt;P&gt;You could do this in a data step by updating&amp;nbsp; and retaining a cumulative discount rate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  retain cum_disc_rate 1;

  cum_disc_rate=cum_disc_rate*(1-rate);
  cum_disc_cf=cf*cum_disc_rate;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 05:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476983#M286141</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-07-11T05:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476985#M286142</link>
      <description>&lt;P&gt;Thanks for your reply but I want to find "&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;" value.&lt;/P&gt;&lt;P&gt;[2,000 = 1,200*(1-0.04*&lt;FONT color="#ff0000"&gt;&lt;EM&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;) + 1,100*(1-0.04&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;)*(1-0.05&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;) + 1,000&lt;SPAN&gt;*(1-0.04&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;)*(1-0.05&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/SPAN&gt;*(1-0.06&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;)]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I get "&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#ff0000"&gt;x&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;" value by using PROC MODEL with RETAIN??&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 06:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/476985#M286142</guid>
      <dc:creator>YoungSun</dc:creator>
      <dc:date>2018-07-11T06:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/477062#M286143</link>
      <description>&lt;P&gt;That is best solved by IML/OR ( FROOT() , POLYROOT() ). Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;If you don't have IML, Try&amp;nbsp; PROC FCMP has a function SOLVE(). I remembered&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;post some kind of code .&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/477062#M286143</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-11T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cash Flow and Changing Rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/478523#M286144</link>
      <description>&lt;P&gt;Thanks. I'll check the posts you recommended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 01:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cash-Flow-and-Changing-Rate/m-p/478523#M286144</guid>
      <dc:creator>YoungSun</dc:creator>
      <dc:date>2018-07-17T01:00:02Z</dc:date>
    </item>
  </channel>
</rss>

