<?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: estimate CAPM model in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519701#M140815</link>
    <description>&lt;P&gt;Hi, thanking for replying.&lt;/P&gt;&lt;P&gt;How could I fix that problem, because when i open the temp work, all my independent variables are zero, and dependent variables are -1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;songchan&lt;/P&gt;</description>
    <pubDate>Sat, 08 Dec 2018 22:38:02 GMT</pubDate>
    <dc:creator>Songchan</dc:creator>
    <dc:date>2018-12-08T22:38:02Z</dc:date>
    <item>
      <title>estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519622#M140773</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use proc reg to estimate capm model, i've sorted the data by some conditions (permno date), but the codes didn't work,&amp;nbsp; the log says Interactivity disabled with By processing, can anybody help me with that problem?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg noprint data=aa03 outest=capm;
      model exret=mkt_rf / sse ;
	  by permno date;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Dec 2018 01:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519622#M140773</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-12-08T01:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519630#M140780</link>
      <description>&lt;P&gt;"Interactivity disabled with By processing" is an informative Note, not an error at all.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 04:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519630#M140780</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-12-08T04:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519635#M140785</link>
      <description>&lt;P&gt;Proc REG, like all (I think) proc's that accept the quit statement is an "interactive" module.&amp;nbsp; I.e. you could enter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; proc reg data=mydata;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var y x1 x2 x3;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y=x1 x2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you could examine the results, and spontaneously choose another model (using any vars in the VARS statement):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; model y= x1 x3;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data wouldn't be reread, because proc reg stored the SSCP for all 4 variables, so any models among those variables could be estimated.&amp;nbsp; Also, for large datasets, I suspect the first model would take much longer that later models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You wouldn't get out of proc reg until you issue&amp;nbsp;a "quit:" statement, or start a new PROC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But a BY statement would mean that proc reg would have to create an SSCP matrix for each by group, and I suspect that the&amp;nbsp;2nd SSCP replaces the first in memory, the 3rd replaces the 2nd, etc.&amp;nbsp; If that's the case, then you couldn't "interactively" enter the second model, because the only sscp available would be for the last by group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All this means is that there's no changing the proc reg in mid-stream.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 05:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519635#M140785</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-12-08T05:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519701#M140815</link>
      <description>&lt;P&gt;Hi, thanking for replying.&lt;/P&gt;&lt;P&gt;How could I fix that problem, because when i open the temp work, all my independent variables are zero, and dependent variables are -1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;songchan&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 22:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519701#M140815</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-12-08T22:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519713#M140820</link>
      <description>&lt;P&gt;I just notice your PROC REG code includes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; BY PERMNO DATE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;suggesting you are using CRSP data, which has one observation per permno/date.&amp;nbsp; No regression possible.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you want a Capital Asset Pricing Model estate, which is usually applied to a single stock, or each to a portfolio, you probably should use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; BY PERMNO;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2018 00:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/519713#M140820</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-12-09T00:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521288#M141414</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did what you suggested, but the result shows that my exret=-1, what that means?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Songchan&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 21:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521288#M141414</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-12-13T21:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521291#M141415</link>
      <description>&lt;P&gt;By the way, my data was sorted into ten groups, i want to run regression in every rank, so i wrote&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by permno myrank,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but&amp;nbsp;result&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;shows that exret=0, and numbers of regressors in model&amp;nbsp;were&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;very small (eg. 0.105..) as well as numbers of parameters in model were.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Songchan&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 21:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521291#M141415</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-12-13T21:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521337#M141446</link>
      <description>&lt;OL&gt;
&lt;LI&gt;If exret=0 and if exret is the dependent variable, then your model specification ("&amp;nbsp;&lt;SPAN class="token procnames"&gt;model&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;ex&lt;/SPAN&gt;ret&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;mkt_rf &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; sse &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;") &amp;nbsp;is not the problem.&amp;nbsp; Rather it is how you calculated exret before submitting it to the model.&lt;/LI&gt;
&lt;LI&gt;You're using "by permno myrank".&amp;nbsp; Does that mean you are dividing all the observations for each permno into 10 groups?&amp;nbsp; I can't see why you would do that.&amp;nbsp; Usually financial researchers divide the stocks into 10 deciles, ie. each permno is assigned to a single decile (myrank in your case).&amp;nbsp; If that's what you did, then "by permno myrank" would generate the same set of results as "by permno", because MYRANK would be a constant within each PERMNO group.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why don't you focus on doing the work you need with 1 permno, just to make sure you have the proper process.&amp;nbsp; Then do it for 10 PERMNO's, 1&amp;nbsp;in each decile, using a BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 00:46:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521337#M141446</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-12-14T00:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: estimate CAPM model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521655#M141553</link>
      <description>&lt;P&gt;Hi, I was replicating momentum strategy, i.e. divide all stocks into ten deciles, and calculate capm alpha for each decile. So i need ten alphas in total eventually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Songchan&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 21:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/estimate-CAPM-model/m-p/521655#M141553</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2018-12-14T21:08:54Z</dc:date>
    </item>
  </channel>
</rss>

