<?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: Creating monthly stock sample in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648195#M194116</link>
    <description>&lt;P&gt;This is a sample of my input table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Input DataSet" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39490iCA46B1D917328A51/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-05-16 at 00.16.13.png" alt="Input DataSet" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Input DataSet&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what i would like have in output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Output DataSet" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39491i3E3F3CA8E8EF9792/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-05-16 at 00.18.00.png" alt="Output DataSet" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Output DataSet&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The Beginning_year should be equal to my date, because it represent the start point of the my Holding period.&lt;/P&gt;&lt;P&gt;The End_Date should be equal to the last day of the next month (ex. in the first row should be equal to 28FEB1926), because my holding period is one month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this suggestions, will be clear.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 22:28:09 GMT</pubDate>
    <dc:creator>Lukito</dc:creator>
    <dc:date>2020-05-15T22:28:09Z</dc:date>
    <item>
      <title>Creating monthly stock sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/647988#M193991</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have two datasets. One has only yearly observations for month 7. Another one has monthly frequency for each year year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to rearrange this code for the&amp;nbsp; dataset where with monthly observations and find a monthly&amp;nbsp; holding period of 30 days. My monthly dataset starts in january 1926 and ends in march 2012.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code for the dataset for annual observations&lt;/P&gt;&lt;P&gt;/*I'm creating two variables. These are date variables.&lt;BR /&gt;one will store July 1st of the same year&lt;BR /&gt;one will store 30/ of next year&lt;BR /&gt;this is the holding period.&lt;BR /&gt;This is useful because I only need to get from CRSP the return for this period*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample_stocks;
set sample5;
Beginning_date=mdy(07,01,year);
End_date=mdy(06,30,year+1);
format End_date date9.;
format Beginning_date date9.;
drop Mkcap sum_Mkcap number_stocks;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do you have any tips to modify this code?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 10:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/647988#M193991</guid>
      <dc:creator>Lukito</dc:creator>
      <dc:date>2020-05-15T10:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating monthly stock sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648149#M194090</link>
      <description>&lt;P&gt;Please provide a small meaningful sample of both input datasets and of the corresponding expected output data table.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 20:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648149#M194090</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-15T20:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating monthly stock sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648195#M194116</link>
      <description>&lt;P&gt;This is a sample of my input table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Input DataSet" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39490iCA46B1D917328A51/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-05-16 at 00.16.13.png" alt="Input DataSet" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Input DataSet&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what i would like have in output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Output DataSet" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39491i3E3F3CA8E8EF9792/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-05-16 at 00.18.00.png" alt="Output DataSet" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Output DataSet&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The Beginning_year should be equal to my date, because it represent the start point of the my Holding period.&lt;/P&gt;&lt;P&gt;The End_Date should be equal to the last day of the next month (ex. in the first row should be equal to 28FEB1926), because my holding period is one month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this suggestions, will be clear.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 22:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648195#M194116</guid>
      <dc:creator>Lukito</dc:creator>
      <dc:date>2020-05-15T22:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating monthly stock sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648235#M194139</link>
      <description>&lt;P&gt;If all you want is the end date from the next month:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;end_date = intnx("month", date, 1, "end");&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 03:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-monthly-stock-sample/m-p/648235#M194139</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-16T03:46:39Z</dc:date>
    </item>
  </channel>
</rss>

