<?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 Invalid argument to function FINANCE 'ppmt' with 0 interest rate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886616#M350338</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Version: 9.4 M5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to use the function FINANCE 'ppmt' with 0 interest rate but I have received the following warning:&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"NOTE: Argument 2 to function FINANCE('PPMT',0,2,120,1000000,0,0) at line 37 column 14 is invalid."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the same parameters in PPMT function and it works.&amp;nbsp; The code I used is below and the result I was expecting from FINANCE ppmt is -8333.33.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data test2;&lt;BR /&gt;temp_finance=finance('PPMT',0,2,120,1000000,0,0);&amp;nbsp; ===&amp;gt;&amp;nbsp; .&lt;BR /&gt;temp_ppm=ppmt(0,2,120,1000000,0,0);&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;gt;8333.333&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test1;&lt;BR /&gt;temp_finance=finance('PPMT',0.08,2,120,1000000,0,0);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;===&amp;gt;&amp;nbsp;-8.42762968&lt;BR /&gt;temp_ppm=ppmt(0.08,2,120,1000000,0,0);&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;gt;&amp;nbsp;8.4276296798&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A similar issue has been raised for FINANCE 'pv' (&lt;A href="https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-pv-with-0-interest-rate/m-p/809393" target="_blank"&gt;Solved: Invalid argument to function FINANCE 'pv' with 0 interest rate - SAS Support Communities&lt;/A&gt;) and it looks like a bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;smm662002&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 11:45:17 GMT</pubDate>
    <dc:creator>smm662002</dc:creator>
    <dc:date>2023-07-27T11:45:17Z</dc:date>
    <item>
      <title>Invalid argument to function FINANCE 'ppmt' with 0 interest rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886616#M350338</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Version: 9.4 M5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to use the function FINANCE 'ppmt' with 0 interest rate but I have received the following warning:&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"NOTE: Argument 2 to function FINANCE('PPMT',0,2,120,1000000,0,0) at line 37 column 14 is invalid."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the same parameters in PPMT function and it works.&amp;nbsp; The code I used is below and the result I was expecting from FINANCE ppmt is -8333.33.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data test2;&lt;BR /&gt;temp_finance=finance('PPMT',0,2,120,1000000,0,0);&amp;nbsp; ===&amp;gt;&amp;nbsp; .&lt;BR /&gt;temp_ppm=ppmt(0,2,120,1000000,0,0);&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;gt;8333.333&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test1;&lt;BR /&gt;temp_finance=finance('PPMT',0.08,2,120,1000000,0,0);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;===&amp;gt;&amp;nbsp;-8.42762968&lt;BR /&gt;temp_ppm=ppmt(0.08,2,120,1000000,0,0);&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;gt;&amp;nbsp;8.4276296798&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A similar issue has been raised for FINANCE 'pv' (&lt;A href="https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-pv-with-0-interest-rate/m-p/809393" target="_blank"&gt;Solved: Invalid argument to function FINANCE 'pv' with 0 interest rate - SAS Support Communities&lt;/A&gt;) and it looks like a bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;smm662002&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 11:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886616#M350338</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2023-07-27T11:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function FINANCE 'ppmt' with 0 interest rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886622#M350340</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The FINANCE function has a limitation which checks for (strictly) positive values for the "rate".&amp;nbsp;&amp;nbsp;If a negative (or zero) value is passed, it will return the message in the SAS log that &lt;EM&gt;Argument 2&amp;nbsp;is invalid&lt;/EM&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The PPMT functions do not have this limitation.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Please use the PPMT function instead of the FINANCE function with the PPMT as the first argument.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Here is the link to the documentation on the PPMT function:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1m2s8u7i0jfo6n1c0siw2vinb9t.htm&amp;amp;locale=en" target="new"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1m2s8u7i0jfo6n1c0siw2vinb9t.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 12:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886622#M350340</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-07-27T12:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function FINANCE 'ppmt' with 0 interest rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886631#M350343</link>
      <description>&lt;P&gt;Hi Koen,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your answer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be great if SAS documentation would clearly mention the limitations of FINANCE function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;smm662002&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 13:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886631#M350343</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2023-07-27T13:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function FINANCE 'ppmt' with 0 interest rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886637#M350348</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1962"&gt;@smm662002&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It would be great if SAS documentation would clearly mention the limitations of FINANCE function.&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You are absolutely right.&lt;BR /&gt;I was also surprised this is not in the official doc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can provide feedback on the doc if you want.&lt;BR /&gt;See feedback button on the top right.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sbxkoenk_0-1690465616130.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86173i33A23E251A3193E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sbxkoenk_0-1690465616130.png" alt="sbxkoenk_0-1690465616130.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/helpcenterwlcm/1.0/home.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/helpcenterwlcm/1.0/home.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;DIV id="ConnectiveDocSignExtentionInstalled" data-extension-version="1.0.4"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jul 2023 13:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/886637#M350348</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-07-27T13:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function FINANCE 'ppmt' with 0 interest rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/890176#M351740</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547"&gt;@sbxkoenk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The FINANCE function has a limitation which checks for (strictly) positive values for the "rate".&amp;nbsp;&amp;nbsp;If a negative (or zero) value is passed, it will return the message in the SAS log that &lt;EM&gt;Argument 2&amp;nbsp;is invalid&lt;/EM&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The PPMT functions do not have this limitation.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Please use the PPMT function instead of the FINANCE function with the PPMT as the first argument.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is the link to the documentation on the PPMT function:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1m2s8u7i0jfo6n1c0siw2vinb9t.htm&amp;amp;locale=en" target="new"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p1m2s8u7i0jfo6n1c0siw2vinb9t.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;/P&gt;&lt;P&gt;Koen&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the same problem with Finance function.&lt;/P&gt;&lt;P&gt;I did resolve a problem with negative values for Rate by adding&lt;/P&gt;&lt;PRE&gt;*(1+Rate)**Nper;&lt;/PRE&gt;&lt;P&gt;after the function, but still have a problem for Zero value for rate.&lt;/P&gt;&lt;P&gt;I'm not sure that PPMT function can be a solution in my case, cause I need make calculation for negative values in Pmt as well, while PPMT function requires this parameter to be positive only.&lt;/P&gt;&lt;P&gt;Can you help in my case?&lt;/P&gt;&lt;P&gt;Here an example for numbers I made calculation on them.&lt;/P&gt;&lt;P&gt;I except to get r = 94 with given numbers:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Data AAA;
/*	Rate = -0.0138067061143984;*/
	Rate = 0;
/*	Rate = 1;*/
	Nper = 1;
	Pmt = -94;
	Pv = 0;
	Type = 1;
	r = Finance('Pv', Rate, Nper, Pmt, Pv, Type)*(1+Rate)**Nper;

Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Aug 2023 11:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/890176#M351740</guid>
      <dc:creator>IgorR</dc:creator>
      <dc:date>2023-08-21T11:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function FINANCE 'ppmt' with 0 interest rate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/890204#M351753</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446395"&gt;@IgorR&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you make a new topic (new request)?&lt;/P&gt;
&lt;P&gt;This topic is already closed (solved) and nobody will look into your follow-up question because of that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Koen&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 14:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-argument-to-function-FINANCE-ppmt-with-0-interest-rate/m-p/890204#M351753</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-08-21T14:11:56Z</dc:date>
    </item>
  </channel>
</rss>

