<?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: Error message from FUNCTION YIELDP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729904#M227217</link>
    <description>Error messages need updating but I'm also seeing some weird data there so I think the data doesn't quite follow the expected logic/relationship expected for a bond in certain cases. Are you certain these are all valid values for this function?</description>
    <pubDate>Mon, 29 Mar 2021 22:18:42 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-03-29T22:18:42Z</dc:date>
    <item>
      <title>Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729863#M227204</link>
      <description>&lt;P&gt;I am trying to to calculate bond yield using SAS function YIELDP (&lt;A href="https://documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.1&amp;amp;docsetId=ds2ref&amp;amp;docsetTarget=p18048hzti9pzbn1gnrhmm46rhoo.htm&amp;amp;locale=en" target="_self"&gt;link&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the function's description to call:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; ytm = yieldp(100, coupon / 100, 2, k, k0, price_dirty);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function returns reasonable values for most observations, but I do get many error massages:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Argument 1 to function YIELDP(100,0.013,2,1,0.002739726,99.053592466) at line 2149 column 11 is invalid.&lt;BR /&gt;offering_date=20141015 maturity=20170615 COUPON=1.3 CRSP_PORTNO=1026667 REPORT_DT=20161231 NBR_SHARES=10000000&lt;BR /&gt;MARKET_VAL=9839825.00 cusip_8digit=00507UAB cusip=00507UAB7 price=98.39825 rating_num=11 rating_date=20161208&lt;BR /&gt;rating_round=12 month=2016-12-31 rating_group=BBB k=1 k0=0.002739726 ai=0.6553424658 price_dirty=99.053592466 ytm=.&lt;BR /&gt;_ERROR_=1 _N_=119156&lt;BR /&gt;NOTE: Argument 1 to function YIELDP(100,0.0511,2,4,0.1698630137,12.93) at line 2149 column 11 is invalid.&lt;BR /&gt;offering_date=20010410 maturity=20190315 COUPON=5.11 CRSP_PORTNO=1031647 REPORT_DT=20170430 NBR_SHARES=507340&lt;BR /&gt;MARKET_VAL=57075.75 cusip_8digit=009451AP cusip=009451AP0 price=11.25 rating_num=1 rating_date=20141120 rating_round=2&lt;BR /&gt;month=2017-04-30 rating_group= k=4 k0=0.1698630137 ai=1.68 price_dirty=12.93 ytm=. _ERROR_=1 _N_=190181&lt;BR /&gt;NOTE: Argument 1 to function YIELDP(100,0.0511,2,4,0.0849315068,13.613999443) at line 2149 column 11 is invalid.&lt;BR /&gt;offering_date=20010410 maturity=20190315 COUPON=5.11 CRSP_PORTNO=1023709 REPORT_DT=20170531 NBR_SHARES=727506&lt;BR /&gt;MARKET_VAL=83663.24 cusip_8digit=009451AP cusip=009451AP0 price=11.499999443 rating_num=1 rating_date=20170531&lt;BR /&gt;rating_round=2 month=2017-05-31 rating_group= k=4 k0=0.0849315068 ai=2.114 price_dirty=13.613999443 ytm=. _ERROR_=1&lt;BR /&gt;_N_=190182&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The input values seem valid. Is there any reason behind these messages?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 19:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729863#M227204</guid>
      <dc:creator>xyxu</dc:creator>
      <dc:date>2021-03-29T19:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729873#M227210</link>
      <description>&lt;P&gt;If you are running an older version of SAS (prior to 9.4 TS1M3), this problem might be a known bug. See:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/57/781.html" target="_self"&gt;Problem Note 57781: The YIELDP function returns "NOTE: Invalid argument to function YIELDP"&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 20:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729873#M227210</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-03-29T20:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729875#M227211</link>
      <description>I am running on SAS 9.4. The reported issues seem to be related to 9.2, so I guess there might be something else going on here</description>
      <pubDate>Mon, 29 Mar 2021 20:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729875#M227211</guid>
      <dc:creator>xyxu</dc:creator>
      <dc:date>2021-03-29T20:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729876#M227212</link>
      <description>&lt;P&gt;It was only fixed in 9.4 TS1M3...&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 20:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729876#M227212</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-03-29T20:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729898#M227213</link>
      <description>Just checked mine, it is 9.4 (TS1M3 MBCS3170)</description>
      <pubDate>Mon, 29 Mar 2021 20:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729898#M227213</guid>
      <dc:creator>xyxu</dc:creator>
      <dc:date>2021-03-29T20:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729899#M227214</link>
      <description>I would also try your code using SAS Academics on Demand with the same values to see if it errors out first, then you can concretely say the issue isn't fixed in your version. Either way sounds like it may be time to raise a ticket with SAS Tech Support.</description>
      <pubDate>Mon, 29 Mar 2021 21:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729899#M227214</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-29T21:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729901#M227215</link>
      <description>&lt;P&gt;Still errs in SAS On Demand (9.4 ts1m6)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         data test;
 70         COUPON=1.3;
 71         k=1;
 72         k0=0.002739726;
 73         price_dirty=99.053592466;
 74         ytm = yieldp(100, coupon / 100, 2, k, k0, price_dirty);
 75         run;
 
 NOTE: Argument 1 to function YIELDP(100,0.013,2,1,0.002739726,99.053592466) at ligne 74 colonne 7 is invalid.
 COUPON=1.3 k=1 k0=0.002739726 price_dirty=99.053592466 ytm=. _ERROR_=1 _N_=1
 NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to 
       missing values.
       Each place is given by: (Number of times) at (Line):(Column).
       1 à 74:7   
 NOTE: The data set WORK.TEST has 1 observations and 5 variables.
 NOTE: DATA statement a utilisé (Durée totale du traitement) :
       real time           0.00 seconds
       cpu time            0.00 seconds
       &lt;/PRE&gt;
&lt;P&gt;Either the function needs more fixing or the doc needs updating.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 21:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729901#M227215</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-03-29T21:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error message from FUNCTION YIELDP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729904#M227217</link>
      <description>Error messages need updating but I'm also seeing some weird data there so I think the data doesn't quite follow the expected logic/relationship expected for a bond in certain cases. Are you certain these are all valid values for this function?</description>
      <pubDate>Mon, 29 Mar 2021 22:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-from-FUNCTION-YIELDP/m-p/729904#M227217</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-29T22:18:42Z</dc:date>
    </item>
  </channel>
</rss>

