<?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: Calculating IRR / Setting up dataset for IRR calc in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385048#M92060</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Is that clearer?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not even in the slightest. Best of luck.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2017 16:47:40 GMT</pubDate>
    <dc:creator>HB</dc:creator>
    <dc:date>2017-08-02T16:47:40Z</dc:date>
    <item>
      <title>Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385011#M92039</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset in the following format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;Property   Draw_Date_1 Draw_Amount1 ... Draw_DateX Draw_AmountX final_Value_Date final_Value&lt;/STRONG&gt;
Property1  01/01/2015  -10,000      ... 16/07/2015 -40,000      31/12/2015       150,000
Property2  03/04/2015  -20,000      ... 18/07/2016 .            31/12/2016       140,000&lt;/PRE&gt;&lt;P&gt;As you can see in the above, each&amp;nbsp;row represents one property, with the payment dates and amounts as the variables. Not each property has a drawdown for every drawdown date, in which case the corresponding amount and dates are set to missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like, for each property, to calculate the IRR, using each drawdown amount/date as an outflow, and the final value/date as the eventual inflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to do this would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&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;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;</description>
      <pubDate>Wed, 02 Aug 2017 16:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385011#M92039</guid>
      <dc:creator>MikeFranz</dc:creator>
      <dc:date>2017-08-02T16:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385017#M92044</link>
      <description>&lt;P&gt;You might define what IRR stands for, and possibly point to a reference, for those of us that don't work in your realestate (?) field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS has an IRR function but the values you post do not seem to correspond to what is used by that function.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 15:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385017#M92044</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-02T15:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385030#M92053</link>
      <description>&lt;P&gt;Hi, good point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IRR is the internal rate of return.&amp;nbsp;Is it the interest rate which makes the present &amp;nbsp;value of a series of cashflows equal to zero.&lt;/P&gt;&lt;P&gt;So, for instance, if we have monthly ouflows (payments) into a trading account for 12 months of $100, and the final value of the investment after 12 months $1,300, then the IRR is the interest rate at which one would discount all these cashflows to result in a zero present value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a link to an article that explains it more clearly than I have:&amp;nbsp;&lt;A href="http://www.investopedia.com/terms/i/irr.asp" target="_blank"&gt;http://www.investopedia.com/terms/i/irr.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will add a "finance" tag to the question, thanks for the advice.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 16:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385030#M92053</guid>
      <dc:creator>MikeFranz</dc:creator>
      <dc:date>2017-08-02T16:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385031#M92054</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Any ideas on how to do this&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first idea might be a better (normalized) data structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given data in the format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data property_data;
   input property eventdate MMDDYY10. eventamount eventtype $1.;
datalines;
1 01/01/2015 -10000 d
1 07/16/2015 -40000 d
1 12/31/2015 150000 f
2 03/15/2016 -10000 d
2 03/16/2016 -10000 d
2 03/17/2016 -10000 d
2 03/18/2016 50000 f
3 12/01/2017 -50000 d
3 12/02/2017 -50000 d
3 12/03/2017 -50000 d
3 12/04/2017 -50000 d
3 12/31/2017 250000 f
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where an event type of d is a&amp;nbsp; draw and event type of f is a final valuation. You can run proc sql&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table internal_return_rate as
select property, 
sum(case when eventtype = 'd' then eventamount else 0 end) as total_draw, 
sum(case when eventtype = 'f' then eventamount else 0 end) as final_amount 
from property_data
group by property
order by property;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and come up with&lt;/P&gt;
&lt;PRE&gt;                                                  total_    final_
                              Obs    property      draw     amount

                               1         1        -50000    150000
                               2         2        -30000     50000
                               3         3       -200000    250000


&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 16:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385031#M92054</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2017-08-02T16:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385032#M92055</link>
      <description>Hi! Thanks for the reply. I understand what you're doing, but perhaps the issue comes back (as mentioned by previous contributor) to me not explaining what IRR is. I've included a separate link in the above to explain the function. Thanks again!&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Aug 2017 16:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385032#M92055</guid>
      <dc:creator>MikeFranz</dc:creator>
      <dc:date>2017-08-02T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385035#M92056</link>
      <description>&lt;P&gt;I understand IRR. You use it to take into account the time value of money for payments in the future.&amp;nbsp; Your data is payments already made.&amp;nbsp; Perhaps you should provide more detail on exactly what you want to do.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 16:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385035#M92056</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2017-08-02T16:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385044#M92058</link>
      <description>Yes, sure. Each row can be considered a separate "project". So, I have a cash outflow on each Draw_Date, of amount Draw_Amount for each project. I then have a terminal cash inflow on final_Value_Date of amount final_Value_Amount. I would like to calculate the IRR of these cashflows for each project. Is that clearer? Thanks</description>
      <pubDate>Wed, 02 Aug 2017 16:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385044#M92058</guid>
      <dc:creator>MikeFranz</dc:creator>
      <dc:date>2017-08-02T16:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385048#M92060</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Is that clearer?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not even in the slightest. Best of luck.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 16:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385048#M92060</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2017-08-02T16:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating IRR / Setting up dataset for IRR calc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385069#M92061</link>
      <description>&lt;P&gt;Look at &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p1cnn1jwdmhce0n1obxmu4iq26ge.htm" target="_self"&gt;the FINANCE function&lt;/A&gt;, which enables you to compute the IRR.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 18:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-IRR-Setting-up-dataset-for-IRR-calc/m-p/385069#M92061</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-08-02T18:23:53Z</dc:date>
    </item>
  </channel>
</rss>

