<?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: difference between NPV function in SAS vs Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351218#M273672</link>
    <description>&lt;P&gt;Thank you very much for your answer.&lt;/P&gt;&lt;P&gt;It is really helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can i have one more question?&lt;/P&gt;&lt;P&gt;for example, i have 2 loans, one with monthly payments, and the other with quarterly payments. From what i understood when computing npv the frequency for the first one should be 1. For the second one, how we should consider the frequency?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2017 10:25:05 GMT</pubDate>
    <dc:creator>cati</dc:creator>
    <dc:date>2017-04-19T10:25:05Z</dc:date>
    <item>
      <title>difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/350823#M273669</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me understand the difference between the output in SAS vs Excel when using NPV function?&lt;/P&gt;&lt;P&gt;I have the below example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;No&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Cashflow&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6000&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5000&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4500&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4000&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3500&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;6&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2500&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Rate&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;5.53%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When computing NPV in SAS :&lt;/P&gt;&lt;P&gt;NPV=(rate, freq, cashflows) -&amp;gt;&lt;/P&gt;&lt;P&gt;NPV =(5.53%, 6, &amp;nbsp;6000,5000,4500,4000,3500,2500)=25495.37.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The excel output is NPV=21713.68.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can not figure out the difference or if i computed wrongly in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much,&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 12:54:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/350823#M273669</guid>
      <dc:creator>cati</dc:creator>
      <dc:date>2017-04-18T12:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/350828#M273670</link>
      <description>&lt;P&gt;Google result:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/22/936.html" target="_blank"&gt;http://support.sas.com/kb/22/936.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diff is due to considering first of month payments or end of month payments.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 13:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/350828#M273670</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-18T13:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/350840#M273671</link>
      <description>&lt;P&gt;As Reeza mentioned, there is a difference in the two sets of calculations.&amp;nbsp; Should the first amount be discounted or not?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is also an error in your use of the NPV function.&amp;nbsp; The second number is the frequency of the amounts (how many per time period), not the total number of amounts.&amp;nbsp; So&amp;nbsp; you should be using 1 instead of 6.&amp;nbsp; Here is a test program you can run that illustrates all of these considerations.&amp;nbsp; (You'll have to forgive my formulas for NPV ... they're just in the form that occurred to me as I was programming.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;input amount;&lt;/P&gt;
&lt;P&gt;retain total1 total2 0;&lt;/P&gt;
&lt;P&gt;total1 = total1 + (1/1.0553)**_n_ * amount;&lt;/P&gt;
&lt;P&gt;total2 = total2 + (1/1.0553)**(_n_-1) * amount;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;6000&lt;/P&gt;
&lt;P&gt;5000&lt;/P&gt;
&lt;P&gt;4500&lt;/P&gt;
&lt;P&gt;4000&lt;/P&gt;
&lt;P&gt;3500&lt;/P&gt;
&lt;P&gt;2500&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;proc print;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;npv1 = npv(5.53, 6, 6000, 5000, 4500, 4000, 3500, 2500);&lt;/P&gt;
&lt;P&gt;npv2 = npv(5.53, 1, 6000, 5000, 4500, 4000, 3500, 2500);&lt;/P&gt;
&lt;P&gt;put npv1= npv2=;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 13:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/350840#M273671</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-18T13:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351218#M273672</link>
      <description>&lt;P&gt;Thank you very much for your answer.&lt;/P&gt;&lt;P&gt;It is really helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can i have one more question?&lt;/P&gt;&lt;P&gt;for example, i have 2 loans, one with monthly payments, and the other with quarterly payments. From what i understood when computing npv the frequency for the first one should be 1. For the second one, how we should consider the frequency?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 10:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351218#M273672</guid>
      <dc:creator>cati</dc:creator>
      <dc:date>2017-04-19T10:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351221#M273673</link>
      <description>&lt;P&gt;Thank you for the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cati&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 10:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351221#M273673</guid>
      <dc:creator>cati</dc:creator>
      <dc:date>2017-04-19T10:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351224#M273674</link>
      <description>&lt;P&gt;I think the answer depends on the interest rate and whether it is a straight interest rate or compounded. &amp;nbsp;I'm afraid I haven't used NPV function before this, however, so I don't know all the details. &amp;nbsp;It's possible that you divide the interest rate by 12 (for monthly) and then use a frequency of 1. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 10:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351224#M273674</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-19T10:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: difference between NPV function in SAS vs Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351258#M273675</link>
      <description>&lt;P&gt;Thank you for answering.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Cati&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 12:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/difference-between-NPV-function-in-SAS-vs-Excel/m-p/351258#M273675</guid>
      <dc:creator>cati</dc:creator>
      <dc:date>2017-04-19T12:33:53Z</dc:date>
    </item>
  </channel>
</rss>

