<?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: Calculating interval stock returns WITH CRSP daily dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573319#M161839</link>
    <description>&lt;P&gt;&lt;A href="https://wrds-www.wharton.upenn.edu/pages/support/applications/event-studies/event-study-research-application/" target="_blank"&gt;https://wrds-www.wharton.upenn.edu/pages/support/applications/event-studies/event-study-research-application/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link can answer most of my questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still... I wonder how can I get a monthly return from a specific date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jul 2019 21:29:14 GMT</pubDate>
    <dc:creator>JKCho</dc:creator>
    <dc:date>2019-07-13T21:29:14Z</dc:date>
    <item>
      <title>Calculating interval stock returns WITH CRSP daily dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573284#M161824</link>
      <description>&lt;P&gt;HI!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I need different codes for 1)holding period return and 2)monthly, yearly return, or similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;holding period return is tricky because I need to use days&amp;nbsp;from a certain date to another certain date. In other words, I&amp;nbsp;cannot simply make code someday+1's price and divide a previous day by the next day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For exmaple, from July 12th, 2019, one-day HPR needs the next business day,&amp;nbsp;July 15th, 2019. So... To calculate one-day holding period return, I may need a new code other than day+1.&amp;nbsp; I guess there&amp;nbsp;should the code navigating adding or subtracting days by the order of rows on certain variables. (For example, if the interval is +- 1 business days, that would be July 11st and July 15th, 2019 as my CRSP daily data has the price row following business days) So far, I have looked for the code having date interval specified by the order of rows of interest. Please share your knowledge... Maybe my ability to search for the answer is so poor...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another question is also related to the above question. If I need to know a month return from June 7th, 2019 to July 7th, 2019, I need to have stock prices on both dates. Well... 2019/07/07 is Sunday so I need next day, Monday. In that case, I need another code that automatically finds the next available date on my dataset.&amp;nbsp; I think this is quite an advanced SAS programming.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe the gist of those coding is how to skillfully use the order of rows and I even wonder whether this is possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is almost no way to express my thankfulness to you have helped me other than writing here. However, I would like to thank you again for your helpful replies very much!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 11:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573284#M161824</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-13T11:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating interval stock returns WITH CRSP daily dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573285#M161825</link>
      <description>&lt;P&gt;It would be better to elaborate more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is data having the date stocks purchased. (stock ID, date_purchased)&lt;/P&gt;&lt;P&gt;There is another data having the daily price of stocks. (stock ID, date, price)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate holding period returns using date and price in the second data. Both date_purchased and date are based on business days so ordinary +@ days does not work... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 11:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573285#M161825</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-13T11:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating interval stock returns WITH CRSP daily dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573299#M161831</link>
      <description>&lt;P&gt;Please supply example data in usable form (data step with datalines), so we have something to play around with, and what you expect out of it.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 16:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573299#M161831</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-13T16:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating interval stock returns WITH CRSP daily dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573319#M161839</link>
      <description>&lt;P&gt;&lt;A href="https://wrds-www.wharton.upenn.edu/pages/support/applications/event-studies/event-study-research-application/" target="_blank"&gt;https://wrds-www.wharton.upenn.edu/pages/support/applications/event-studies/event-study-research-application/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link can answer most of my questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still... I wonder how can I get a monthly return from a specific date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 21:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-interval-stock-returns-WITH-CRSP-daily-dataset/m-p/573319#M161839</guid>
      <dc:creator>JKCho</dc:creator>
      <dc:date>2019-07-13T21:29:14Z</dc:date>
    </item>
  </channel>
</rss>

