<?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 Finance function and formatting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712542#M219699</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have been having some trouble to use this following function;&lt;BR /&gt;FINANCE('ACCRINT', issue, first-interest, settlement, rate, par-value, frequency, [basis]);&lt;/P&gt;&lt;P&gt;I used this syntax from here: &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=ds2ref&amp;amp;docsetTarget=n0xns2d1axa92rn1es5q30h8qr7o.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=ds2ref&amp;amp;docsetTarget=n0xns2d1axa92rn1es5q30h8qr7o.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set original;&lt;/P&gt;&lt;P&gt;format i_date MMDDYY10.;&lt;BR /&gt;informat i_date YYMMDD8.;&lt;/P&gt;&lt;P&gt;format fid_date MMDDYY10.;&lt;BR /&gt;informat fid_date YYMMDD8.;&lt;/P&gt;&lt;P&gt;format st_date MMDDYY10.;&lt;BR /&gt;informat st_dateYYMMDD8.;&lt;/P&gt;&lt;P&gt;AI= finance('accrint', i_date, fid_date, st_date, coupon/100, PRINCIPAL_AMT, INTEREST_FREQUENCY, 1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In my original file, the variables format /informat are as follows:&lt;BR /&gt;&lt;BR /&gt;INTEREST_FREQUENCY, PRINCIPAL_AMT, coupon, i_date, fid_date and st_date:&lt;BR /&gt;length: 8&lt;BR /&gt;format: best12.&lt;BR /&gt;informat: best32.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the output, "want" file is created but with missing values for the variable, "AI".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the log, this kind of message is generated:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Argument 4 to function FINANCE('accrint',20041116,20090401,16715,0.1025,1000,2,1) at line&lt;BR /&gt;830 column 6 is invalid.&lt;BR /&gt;Variables description .....................&lt;BR /&gt;NOTE: Argument 4 to function FINANCE('accrint',20041116,20090401,16719,0.1025,1000,2,1) at line&lt;BR /&gt;830 column 6 is invalid.&lt;BR /&gt;Variables description .....................&lt;/P&gt;&lt;P&gt;REPEATS AGAIN............&lt;/P&gt;&lt;P&gt;ERROR: There was a problem with the format so BEST. was used&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used&lt;BR /&gt;................................................................&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please, help me with what changes I should make in my code. It would be a great help if you can correct my original code.&lt;BR /&gt;Thanks in Advance!!!!!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 22:57:06 GMT</pubDate>
    <dc:creator>Nirmol</dc:creator>
    <dc:date>2021-01-19T22:57:06Z</dc:date>
    <item>
      <title>Finance function and formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712542#M219699</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have been having some trouble to use this following function;&lt;BR /&gt;FINANCE('ACCRINT', issue, first-interest, settlement, rate, par-value, frequency, [basis]);&lt;/P&gt;&lt;P&gt;I used this syntax from here: &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=ds2ref&amp;amp;docsetTarget=n0xns2d1axa92rn1es5q30h8qr7o.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=ds2ref&amp;amp;docsetTarget=n0xns2d1axa92rn1es5q30h8qr7o.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set original;&lt;/P&gt;&lt;P&gt;format i_date MMDDYY10.;&lt;BR /&gt;informat i_date YYMMDD8.;&lt;/P&gt;&lt;P&gt;format fid_date MMDDYY10.;&lt;BR /&gt;informat fid_date YYMMDD8.;&lt;/P&gt;&lt;P&gt;format st_date MMDDYY10.;&lt;BR /&gt;informat st_dateYYMMDD8.;&lt;/P&gt;&lt;P&gt;AI= finance('accrint', i_date, fid_date, st_date, coupon/100, PRINCIPAL_AMT, INTEREST_FREQUENCY, 1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In my original file, the variables format /informat are as follows:&lt;BR /&gt;&lt;BR /&gt;INTEREST_FREQUENCY, PRINCIPAL_AMT, coupon, i_date, fid_date and st_date:&lt;BR /&gt;length: 8&lt;BR /&gt;format: best12.&lt;BR /&gt;informat: best32.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the output, "want" file is created but with missing values for the variable, "AI".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the log, this kind of message is generated:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Argument 4 to function FINANCE('accrint',20041116,20090401,16715,0.1025,1000,2,1) at line&lt;BR /&gt;830 column 6 is invalid.&lt;BR /&gt;Variables description .....................&lt;BR /&gt;NOTE: Argument 4 to function FINANCE('accrint',20041116,20090401,16719,0.1025,1000,2,1) at line&lt;BR /&gt;830 column 6 is invalid.&lt;BR /&gt;Variables description .....................&lt;/P&gt;&lt;P&gt;REPEATS AGAIN............&lt;/P&gt;&lt;P&gt;ERROR: There was a problem with the format so BEST. was used&lt;BR /&gt;ERROR: There was a problem with the format so BEST. was used&lt;BR /&gt;................................................................&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please, help me with what changes I should make in my code. It would be a great help if you can correct my original code.&lt;BR /&gt;Thanks in Advance!!!!!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 22:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712542#M219699</guid>
      <dc:creator>Nirmol</dc:creator>
      <dc:date>2021-01-19T22:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Finance function and formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712547#M219703</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In the original file, the variable:&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;st_date) was in regular date format&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;format: MMDDYY10.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;informat: YYMMDD8.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 23:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712547#M219703</guid>
      <dc:creator>Nirmol</dc:creator>
      <dc:date>2021-01-19T23:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Finance function and formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712553#M219707</link>
      <description>&lt;P&gt;Your values i_date and fid_date are not dates just large numbers. That is why you get&lt;/P&gt;
&lt;PRE&gt;NOTE: Argument 4 to function FINANCE('accrint',20041116,20090401,16715,0.1025,1000,2,1) at line
830 column 6 is invalid.&lt;/PRE&gt;
&lt;P&gt;The st_date value of 16715 is 06OCT2005.&lt;/P&gt;
&lt;P&gt;An example of turning such numeric values like 20041116 into dates:&lt;/P&gt;
&lt;PRE&gt;data ;
x=20041116;
put x= date9.;
date = input(put(x,f8.),yymmdd10.);
put date date9.;
run;&lt;/PRE&gt;
&lt;P&gt;The above format date9. for x does not display a value because it is way past the range of values SAS will use for dates, meaning past the year 20,000 (yes 4 zeroes and almost 18,000 years in the future).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The display format of the date value has no impact on any function using the value, such as the Finance function, unless you PUT into a specific character value, which Finance won't like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 00:01:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/712553#M219707</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-20T00:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Finance function and formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/840174#M332214</link>
      <description>I understand perfectly well that nothing will work out just like that; it is necessary to undergo training in this area. I have been looking for good business courses for a long time. I think that I can find good courses with you. Of course, before that, I studied various articles about investing and how to do business correctly and found an attractive site that talked about investments and deposits &lt;A href="https://investorjunkie.com/crypto/inside-satoshi-islands-bid-to-become-a-cryptopia/" target="_blank"&gt;https://investorjunkie.com/crypto/inside-satoshi-islands-bid-to-become-a-cryptopia/&lt;/A&gt; (which may be helpful to someone). In general, I am interested which courses to take and where it is more interesting to study. Maybe someone who has been trained can share their experience.</description>
      <pubDate>Sun, 23 Oct 2022 23:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finance-function-and-formatting/m-p/840174#M332214</guid>
      <dc:creator>NadiaBeasley</dc:creator>
      <dc:date>2022-10-23T23:33:18Z</dc:date>
    </item>
  </channel>
</rss>

