<?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: Calculate a payment amount in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109078#M30405</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a math calculation, the following I believe:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.financeformulas.net/Loan_Payment_Formula.html" title="http://www.financeformulas.net/Loan_Payment_Formula.html"&gt;Loan Payment Formula&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming the following variables:&lt;/P&gt;&lt;P&gt;perrate - interest rate per period (0.0275/12)&lt;/P&gt;&lt;P&gt;nper - number of periods (135)&lt;/P&gt;&lt;P&gt;balance - current balance (18099.42)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unverified:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Payment1 = (perrate*balance)/(1-(1+perrate)**(-1*nper));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Oct 2013 00:02:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-10-10T00:02:51Z</dc:date>
    <item>
      <title>Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109074#M30401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with SAS9.1 on mainframe and need to calculate a payment amount. I have the beginning balance, interest rate, and term, but cannot figure out how to arrive at a payment amount.&amp;nbsp; Any assistance would be greatly appreciated.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 22:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109074#M30401</guid>
      <dc:creator>DFlo</dc:creator>
      <dc:date>2013-10-09T22:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109075#M30402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please post a data step creating some representative sample data and then also tell us how the desired result should look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this about coding or about the business logic (the formula)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your source data stored in a data base or in SAS tables? And what's the volume (number of rows) to be processed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where does the result need to go? Will this be a report or do you need to create or update a table (SAS or DB)? And will this be a one-off job or something you need to run regularly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm asking all these question as with finance data there are often high data volumes involved so performance is important. Also if your data lives in a data base then a SQL approach is often the right way to go (so processing happens on the side where the data resides).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 23:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109075#M30402</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-10-09T23:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109076#M30403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am reading data from our system of record where I am attempting to validate the terms are correct. I am reading in access of 800,000 records. i have the current balance on a loan, the interest rate and the term, example: balance $18,099.42 with an interest rate of 2.75% and 136 months to repay.&amp;nbsp; I have read something about PMT but that does not work; I am guessing my organization does not have license for that function. I am looking to see if there is another way to arrive at the payment amount without using PMT.&amp;nbsp; Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 23:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109076#M30403</guid>
      <dc:creator>DFlo</dc:creator>
      <dc:date>2013-10-09T23:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109077#M30404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I probably should have prefaced my inquiry with I am fairly inexperienced with SAS, I know more of the basics but not always sure of the terminology.&amp;nbsp; What I did was read our files and identified the loans I want to review.&amp;nbsp; I created a field called balance, interestrate and term.&amp;nbsp; My code looks like:&lt;/P&gt;&lt;P&gt;Data Final1;&lt;/P&gt;&lt;P&gt;Set Final;&lt;/P&gt;&lt;P&gt;by SSN;&lt;/P&gt;&lt;P&gt;(I first tried the following):&lt;/P&gt;&lt;P&gt;Payment1 = PMT(0.0275/12, 135, 18099.42, 0, 0);&lt;/P&gt;&lt;P&gt;output final1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I received an error. After some research it was determined I don't have the ability to use PMT apparently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am wondering if there is another way I can calculate a payment amount?&amp;nbsp; I created the following fields but am not sure how to use them in my calculation.&lt;/P&gt;&lt;P&gt;perrate=interestrate/12;&lt;/P&gt;&lt;P&gt;monthint=balance*perrate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may not be the right vehicle to get my answers, I was just trying to resolve it as my normal resource is not available.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 23:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109077#M30404</guid>
      <dc:creator>DFlo</dc:creator>
      <dc:date>2013-10-09T23:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109078#M30405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a math calculation, the following I believe:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.financeformulas.net/Loan_Payment_Formula.html" title="http://www.financeformulas.net/Loan_Payment_Formula.html"&gt;Loan Payment Formula&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming the following variables:&lt;/P&gt;&lt;P&gt;perrate - interest rate per period (0.0275/12)&lt;/P&gt;&lt;P&gt;nper - number of periods (135)&lt;/P&gt;&lt;P&gt;balance - current balance (18099.42)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unverified:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Payment1 = (perrate*balance)/(1-(1+perrate)**(-1*nper));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 00:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109078#M30405</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-10-10T00:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109079#M30406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, I will give this a try, thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 00:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109079#M30406</guid>
      <dc:creator>DFlo</dc:creator>
      <dc:date>2013-10-10T00:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109080#M30407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Verified using formula as found here: &lt;A href="http://en.wikipedia.org/wiki/Fixed-rate_mortgage" title="http://en.wikipedia.org/wiki/Fixed-rate_mortgage"&gt;Fixed-rate mortgage - Wikipedia, the free encyclopedia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure with which SAS version PMT() has been introduced. It's working in my SAS version and the 2 calculations (pmt and formula) return the same values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;&amp;nbsp; input Loan Interest_Annual Term;&lt;BR /&gt;&amp;nbsp; Interest_Month=Interest_Annual/12;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Payment1_formula = Loan*Interest_Month /(1-(1+Interest_Month)**-Term);&lt;BR /&gt;&amp;nbsp; Payment1_pmt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = pmt(Interest_Month,Term,Loan,0,0);&lt;BR /&gt;datalines;&lt;BR /&gt;18099.42 .0275 12&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 00:56:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109080#M30407</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-10-10T00:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109081#M30408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I tried the formula but didn't get the results I expected:&lt;/P&gt;&lt;P&gt;PERRATE=INTRATE/12;&lt;/P&gt;&lt;P&gt;PMT=(PERRATE*BALANCE)/(1-(1+PERRATE)**(-1/NPER));&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE VALUES USED:&lt;/P&gt;&lt;P&gt;PERRATE = .002291667&lt;/P&gt;&lt;P&gt;BALANCE - 18099.42&lt;/P&gt;&lt;P&gt;NPER = 136&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Pmt Amount returned was 2464361.28; quite a bit more than I was expecting. I was expecting something around $155.05. Suggestions on what I am doing wrong?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 00:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109081#M30408</guid>
      <dc:creator>DFlo</dc:creator>
      <dc:date>2013-10-10T00:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109082#M30409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The formula is wrong. It should be:&lt;/P&gt;&lt;P&gt;PMT=(PERRATE*BALANCE)/(1-(1+PERRATE)**(&lt;STRONG&gt;-NPER&lt;/STRONG&gt;)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And not being very experienced in SAS doesn't mean that you can't do some research on your own to find/validate a formula.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 01:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109082#M30409</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-10-10T01:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a payment amount</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109083#M30410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Patrick, this worked.&amp;nbsp; I really appreciate the assistance from both you and Reeza.&amp;nbsp; Have a great night.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 01:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-a-payment-amount/m-p/109083#M30410</guid>
      <dc:creator>DFlo</dc:creator>
      <dc:date>2013-10-10T01:19:15Z</dc:date>
    </item>
  </channel>
</rss>

