<?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: Calculate Stock Return-BHAR in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42979#M8802</link>
    <description>In what structure are your data?</description>
    <pubDate>Sun, 03 Apr 2011 13:52:26 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-04-03T13:52:26Z</dc:date>
    <item>
      <title>Calculate Stock Return-BHAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42978#M8801</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Can help me with SAS code to calculate stock return using buy-and-hold abnormal return using the follwoing formula:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
                       T                T&lt;BR /&gt;
BHARi=∏(1+Ri,t) - ∏  (1+Rbenchmark,t)&lt;BR /&gt;
                       t=1             t=1&lt;BR /&gt;
         &lt;BR /&gt;
&lt;BR /&gt;
Where R i,t is the monthly return for firm i in month t, and R benchmark, t is the monthly&lt;BR /&gt;
return for the benchmark in month t. &lt;BR /&gt;
Firm i is the firm which I need to calculate stock return &lt;BR /&gt;
The benchmark in my case is the matched firm similar to firm i in the size.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also the code should include the following restriction:&lt;BR /&gt;
If the matched firm delisted before calculating the return for firm i, then the next best match should be substituted for the next period.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks

Message was edited by: q1234</description>
      <pubDate>Sun, 03 Apr 2011 09:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42978#M8801</guid>
      <dc:creator>q1234</dc:creator>
      <dc:date>2011-04-03T09:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Stock Return-BHAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42979#M8802</link>
      <description>In what structure are your data?</description>
      <pubDate>Sun, 03 Apr 2011 13:52:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42979#M8802</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-04-03T13:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Stock Return-BHAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42980#M8803</link>
      <description>I have around 700 firms and for each one of them I will calculate the return from a specific date, let us call it the the event year.&lt;BR /&gt;
so I have the following structure ( the firms,  the eventyear,   the monthly stock pric for three years after the event year)&lt;BR /&gt;
&lt;BR /&gt;
Ex;&lt;BR /&gt;
Portfolio 1(the event firms)&lt;BR /&gt;
firms       event date         closing stock prices Jan1999    feb1999.............Dec2001                 &lt;BR /&gt;
i              01/01/999                                           .2               .35                   .45 &lt;BR /&gt;
&lt;BR /&gt;
Portfolio 2(the matched firms)&lt;BR /&gt;
firms       date             closing stock prices Jan1999    feb1999.............Dec2001                 &lt;BR /&gt;
x            01/01/999                                          .3            .18                .63&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanx</description>
      <pubDate>Sun, 03 Apr 2011 14:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42980#M8803</guid>
      <dc:creator>q1234</dc:creator>
      <dc:date>2011-04-03T14:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Stock Return-BHAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42981#M8804</link>
      <description>Can you explain the formula ,∏ is to mean cumulative multiply?&lt;BR /&gt;
And What output looks like?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 06 Apr 2011 10:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42981#M8804</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-06T10:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Stock Return-BHAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42982#M8805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Yes, ∏ is to mean cumulative multiply&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I think the equation might be as followed,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ret=(exp(lret))-1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; benchret=(exp(lbenchret))-1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; bhar=(ret-benchret)*100;&lt;/P&gt;&lt;P&gt;but I don't know how to use the loop to get the buy-and-hold abnormal return on 12 , 24, and 36 months separately.&lt;/P&gt;&lt;P&gt;Thank for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 08:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Stock-Return-BHAR/m-p/42982#M8805</guid>
      <dc:creator>yealing</dc:creator>
      <dc:date>2014-12-15T08:54:33Z</dc:date>
    </item>
  </channel>
</rss>

