<?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: dates of trading days in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670338#M201203</link>
    <description>&lt;P&gt;I think you might be asking about an earlier part of the process ... how to create the list of dates.&amp;nbsp; If that's the case, you need to know the holidays in that time period.&amp;nbsp; Assuming that the only holiday is the fourth of July, you could use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data trading_days;
do date = '08jun2020'd to '17jul2020'd;
   if 1 &amp;lt; weekday(date) &amp;lt; 7 and date ne '04jul2020'd then output;
end;
format date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You will need to check whether there were any other dates in that timeframe, and whether the fourth of July was actually celebrated on July 4th rather than a nearby date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The earlier post gives you ways to combine this list of dates with your set of 740 firms.&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jul 2020 16:33:44 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-07-18T16:33:44Z</dc:date>
    <item>
      <title>dates of trading days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670311#M201195</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 740 firms and I want to attach dates of trading days from June 8th 2020 till July 17th 2020 with these firms. Hence, each firm needs to have a time series of daily dates (Panel data). I want to create a list of dates for these trading days in mmddyy10. format. Is there any SAS code which can help me in this regard? Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 14:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670311#M201195</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2020-07-18T14:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: dates of trading days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670319#M201196</link>
      <description>You can use three approaches&lt;BR /&gt;1. Use a do loop in a data step and output each record &lt;BR /&gt;Do start to end;&lt;BR /&gt; If trading day out put&lt;BR /&gt;End do;&lt;BR /&gt;&lt;BR /&gt;2. If you have a separate data set with dates then a sql join will help. Do not specify a key to join&lt;BR /&gt;Proc sql;&lt;BR /&gt;Create table want&lt;BR /&gt;As select a. Id, b.Date&lt;BR /&gt;From a, b;&lt;BR /&gt;Quit;&lt;BR /&gt;3. You can use a combination of proc expand and proc calendar.</description>
      <pubDate>Sat, 18 Jul 2020 15:27:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670319#M201196</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-07-18T15:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: dates of trading days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670338#M201203</link>
      <description>&lt;P&gt;I think you might be asking about an earlier part of the process ... how to create the list of dates.&amp;nbsp; If that's the case, you need to know the holidays in that time period.&amp;nbsp; Assuming that the only holiday is the fourth of July, you could use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data trading_days;
do date = '08jun2020'd to '17jul2020'd;
   if 1 &amp;lt; weekday(date) &amp;lt; 7 and date ne '04jul2020'd then output;
end;
format date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You will need to check whether there were any other dates in that timeframe, and whether the fourth of July was actually celebrated on July 4th rather than a nearby date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The earlier post gives you ways to combine this list of dates with your set of 740 firms.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 16:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670338#M201203</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-07-18T16:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: dates of trading days</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670388#M201234</link>
      <description>Many Thanks.</description>
      <pubDate>Sat, 18 Jul 2020 21:21:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates-of-trading-days/m-p/670388#M201234</guid>
      <dc:creator>Saba1</dc:creator>
      <dc:date>2020-07-18T21:21:15Z</dc:date>
    </item>
  </channel>
</rss>

