<?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: Invalid argument to function finance IRR in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529954#M32911</link>
    <description>&lt;P&gt;It errors out here for me, after the 53 (I think) entry. I wonder if there's a limit to the number of parameters allowed, ie 52?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data _null_;
    Val1=Finance ('IRR', -185955.43, 5415.43, 230.94, -446.73, -1729.16, -3527.82, 
        -5805.91, -8699.89, -12770.92, -18919.66, -29905.89, -53642.71, 32686.83, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48);
    Put val1;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 02:31:53 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-25T02:31:53Z</dc:date>
    <item>
      <title>Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529923#M32907</link>
      <description>Not getting result when I ran below code. The finance function results based on data. The function IRR is a data dependant.&lt;BR /&gt;&lt;BR /&gt;Data _null_;&lt;BR /&gt;&lt;BR /&gt;Val1=Finance ('IRR', -185955.43, 5415.43, 230.94, -446.73, -1729.16, -3527.82, -5805.91, -8699.89, -12770.92, -18919.66,-29905.89, -53642.71,32686.83,107.48, 107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48,107.48,&lt;BR /&gt;&lt;BR /&gt;107.48,107.48,107.48,107.48,107.48);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Put val1;&lt;BR /&gt;&lt;BR /&gt;Run;</description>
      <pubDate>Thu, 24 Jan 2019 23:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529923#M32907</guid>
      <dc:creator>naresh1</dc:creator>
      <dc:date>2019-01-24T23:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529933#M32908</link>
      <description>&lt;P&gt;Hi Naresh and welcome to the community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've done some experiments with your data and with the finance('IRR',...) function and think the error may be due to the large negative values you have early in your list. I suspect these are causing a very large negative rate of return which the function can't handle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can simulate this more simply with the following code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	val1=finance('IRR',-10,20,2000,30);
	put val1=;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This returns a result but if you make the third value -2000 instead of 2000 you get the same error you are seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to refer this to SAS Support by raising a track which you can do here -&amp;gt;&amp;nbsp;&lt;A href="https://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;https://support.sas.com/ctx/supportform/createForm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They should be able to confirm if my suspicions are correct and possibly offer a workaround.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 00:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529933#M32908</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2019-01-25T00:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529934#M32909</link>
      <description>I definitely think this is a SAS Support question. It doesn't appear related to the data, in my tests, I could get about 3/4 lines of 107.48 list and then it dies. It seems to error out at a specific number of entries....no idea why. It also errors out in other ways, so it's definitely finicky and both the documentation and errors are unhelpful.</description>
      <pubDate>Fri, 25 Jan 2019 00:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529934#M32909</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-25T00:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529936#M32910</link>
      <description>&lt;P&gt;I suspect the combination of values you are using is limiting the function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a little macro that inserted a value repeatedly and generated the same error with as few as 3 parameters:&lt;/P&gt;
&lt;PRE&gt;Data _null_;
Val1=Finance ('IRR',-185955.43,-100,-100);
Put val1;
Run; 
&lt;/PRE&gt;
&lt;P&gt;But changing the last -100 to 100 yields a result. So it is likely something in the algorithm.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 00:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529936#M32910</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-25T00:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529954#M32911</link>
      <description>&lt;P&gt;It errors out here for me, after the 53 (I think) entry. I wonder if there's a limit to the number of parameters allowed, ie 52?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data _null_;
    Val1=Finance ('IRR', -185955.43, 5415.43, 230.94, -446.73, -1729.16, -3527.82, 
        -5805.91, -8699.89, -12770.92, -18919.66, -29905.89, -53642.71, 32686.83, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48);
    Put val1;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 02:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529954#M32911</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-25T02:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529998#M32912</link>
      <description>&lt;P&gt;That's possible although the documentation (such as it is) doesn't mention a limit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've done a Google search on the Excel version of IRR and found that it's implementation of IRR also has similar issues. My suggestion of a very large negative rate of return causes problems with Excel as does multiple switching from positive to negative values and too many iterations of the algorithm being required to generate a solution as the algorithm is itself internally iterative (this might tie in with your suggestion of their being too many parameters for the function to handle). Assuming that both SAS and Excel use the same algorithm this strengthens the view that we won't solve this here and SAS Support would be the best port of call for&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/257588"&gt;@naresh1&lt;/a&gt;&amp;nbsp;to pursue this&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 09:50:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/529998#M32912</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2019-01-25T09:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/530000#M32913</link>
      <description>&lt;P&gt;Did you also try function IRR() ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 10:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/530000#M32913</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-01-25T10:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/530097#M32914</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It errors out here for me, after the 53 (I think) entry. I wonder if there's a limit to the number of parameters allowed, ie 52?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data _null_;
    Val1=Finance ('IRR', -185955.43, 5415.43, 230.94, -446.73, -1729.16, -3527.82, 
        -5805.91, -8699.89, -12770.92, -18919.66, -29905.89, -53642.71, 32686.83, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 107.48, 
        107.48, 107.48, 107.48, 107.48);
    Put val1;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The limit is apparently very data value dependent. The little macro I wrote actually ran with up to 1000 same, admittedly not very large, positive values given a starting value in the -18000 range.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 15:44:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/530097#M32914</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-25T15:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function finance IRR</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/530101#M32915</link>
      <description>I don't remember my math finance that well, but I don't recall this being an intensive calculation.</description>
      <pubDate>Fri, 25 Jan 2019 15:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Invalid-argument-to-function-finance-IRR/m-p/530101#M32915</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-25T15:53:18Z</dc:date>
    </item>
  </channel>
</rss>

