<?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 t-stats for portfolio returns using White’s heteroskedasticity-adjusted standard error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397967#M96218</link>
    <description>&lt;P&gt;Hi Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your response. Please find the data given below, basically its its average monthly returns of two portfolios (time-series). In the past, I used to estimate Newey West t-statistics and found online that t-stat using White’s heteroskedasticity-adjusted standard error is similar, but not sure since it provided me the same answer like simple t-stat. Furthermore, is it possible to code it in a way that I can get&amp;nbsp;&lt;SPAN&gt;White’s heteroskedasticity-adjusted for both the portfolios at once instead of running the model for each portfolio seperately?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards expandtabs truncover;
input date : yymmn6. port1 port2 ;
format date yymmn6.;
cards;
199501	-12.8774	-15.9533
199502	2.3605	1.2441
199503	11.3115	3.8817
199504	-7.5567	-6.0238
199505	4.861	1.463
199506	-8.4025	-5.5822
199507	7.877	10.0285
199507	3.8999	2.2173
199508	2.8722	5.5666
199508	4.7494	2.9481
199509	-0.1961	-0.967
199509	-0.906	-3.0715
199510	2.2826	1.3475
199510	1.2008	1.9409
199511	-7.8011	-7.7997
199511	-5.1886	-3.1171
199512	-12.0533	-12.5316
199512	-6.8809	-9.8692
199601	-2.6321	-3.3365
199601	-4.6634	-4.5228
199602	3.352	3.9263
199602	3.082	2.4645
199603	0.1532	2.1435
199603	-1.9428	0.0755
199604	27.5239	25.988
199604	34.4729	42.8569
199605	-5.9426	-9.9524
199605	1.3499	-0.6048
199606	21.3006	15.486
199606	18.1896	13.6956
199607	5.852	5.1746
199607	33.8655	42.5136
199608	-3.3695	0.6106
199608	5.7739	-1.5214
199609	5.857	5.1485
199609	6.3112	0.6669
199610	12.395	7.9307
199610	42.0208	51.5401
199611	5.7496	6.882
199611	15.4236	10.3373
199612	-12.608	-10.3824
199612	-21.5054	-29.4552
run;
**** proc means for simple t-stat; 
proc means data=have n mean t probt maxdec=5;
var port1 port2;
run;
**** proc model for White's heteroskedasticity adjusted t-stat of Port1; 

proc model data=have;ods graphics off;
         endo port1 ;
         instruments / intonly;
         		port1=b0;
         fit port1 / gmm kernel=(bart, 1, 0);
         run; 
         quit;
		**** proc model for White's heteroskedasticity adjusted t-stat of Port2; 

proc model data=have;ods graphics off;
         endo port2 ;
         instruments / intonly;
         		port2=b0;
         fit port2 / gmm kernel=(bart, 1, 0);
         run; 
         quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheema&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 00:56:50 GMT</pubDate>
    <dc:creator>MAC1430</dc:creator>
    <dc:date>2017-09-22T00:56:50Z</dc:date>
    <item>
      <title>calculate t-stats for portfolio returns using White’s heteroskedasticity-adjusted standard errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397705#M96137</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please advise me if there is a way to&amp;nbsp;estimate&amp;nbsp;&lt;STRONG&gt;t-stats for portfolio returns&lt;/STRONG&gt; using White’s heteroskedasticity-adjusted standard errors, especially in proc means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thansk in advancefor your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheema&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 08:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397705#M96137</guid>
      <dc:creator>MAC1430</dc:creator>
      <dc:date>2017-09-21T08:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: calculate t-stats for portfolio returns using White’s heteroskedasticity-adjusted standard error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397757#M96151</link>
      <description>&lt;P&gt;We'll need more details (structure of data?) to offer anything concrete. &amp;nbsp;I think these estimates&amp;nbsp;are also called "sandwich estimates" (?). They aren't part of PROC MEANS but you can get them in SAS/STAT procedures such as GENMOD.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 13:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397757#M96151</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-09-21T13:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: calculate t-stats for portfolio returns using White’s heteroskedasticity-adjusted standard error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397967#M96218</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your response. Please find the data given below, basically its its average monthly returns of two portfolios (time-series). In the past, I used to estimate Newey West t-statistics and found online that t-stat using White’s heteroskedasticity-adjusted standard error is similar, but not sure since it provided me the same answer like simple t-stat. Furthermore, is it possible to code it in a way that I can get&amp;nbsp;&lt;SPAN&gt;White’s heteroskedasticity-adjusted for both the portfolios at once instead of running the model for each portfolio seperately?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards expandtabs truncover;
input date : yymmn6. port1 port2 ;
format date yymmn6.;
cards;
199501	-12.8774	-15.9533
199502	2.3605	1.2441
199503	11.3115	3.8817
199504	-7.5567	-6.0238
199505	4.861	1.463
199506	-8.4025	-5.5822
199507	7.877	10.0285
199507	3.8999	2.2173
199508	2.8722	5.5666
199508	4.7494	2.9481
199509	-0.1961	-0.967
199509	-0.906	-3.0715
199510	2.2826	1.3475
199510	1.2008	1.9409
199511	-7.8011	-7.7997
199511	-5.1886	-3.1171
199512	-12.0533	-12.5316
199512	-6.8809	-9.8692
199601	-2.6321	-3.3365
199601	-4.6634	-4.5228
199602	3.352	3.9263
199602	3.082	2.4645
199603	0.1532	2.1435
199603	-1.9428	0.0755
199604	27.5239	25.988
199604	34.4729	42.8569
199605	-5.9426	-9.9524
199605	1.3499	-0.6048
199606	21.3006	15.486
199606	18.1896	13.6956
199607	5.852	5.1746
199607	33.8655	42.5136
199608	-3.3695	0.6106
199608	5.7739	-1.5214
199609	5.857	5.1485
199609	6.3112	0.6669
199610	12.395	7.9307
199610	42.0208	51.5401
199611	5.7496	6.882
199611	15.4236	10.3373
199612	-12.608	-10.3824
199612	-21.5054	-29.4552
run;
**** proc means for simple t-stat; 
proc means data=have n mean t probt maxdec=5;
var port1 port2;
run;
**** proc model for White's heteroskedasticity adjusted t-stat of Port1; 

proc model data=have;ods graphics off;
         endo port1 ;
         instruments / intonly;
         		port1=b0;
         fit port1 / gmm kernel=(bart, 1, 0);
         run; 
         quit;
		**** proc model for White's heteroskedasticity adjusted t-stat of Port2; 

proc model data=have;ods graphics off;
         endo port2 ;
         instruments / intonly;
         		port2=b0;
         fit port2 / gmm kernel=(bart, 1, 0);
         run; 
         quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheema&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 00:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397967#M96218</guid>
      <dc:creator>MAC1430</dc:creator>
      <dc:date>2017-09-22T00:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate t-stats for portfolio returns using White’s heteroskedasticity-adjusted standard error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397975#M96222</link>
      <description>&lt;P&gt;I can answer the second part of your question: &lt;A href="https://blogs.sas.com/content/iml/2011/01/31/reshaping-data-from-wide-to-long-format.html" target="_self"&gt;convert the data from wide form to long form&lt;/A&gt; and then use BY-group processing to process all the variables with one procedure call. For your example that has two variables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data stack;
set have(keep=date port1 rename=(port1=port))
    have(keep=date port2 rename=(port2=port) in=g);
group = g+1;
run;

ods graphics off;
proc model data=stack;
   by group;
   endo port ;
   instruments / intonly;
         port=b0;
   fit port / gmm kernel=(bart, 1, 0);
   run; 
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Sep 2017 02:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-t-stats-for-portfolio-returns-using-White-s/m-p/397975#M96222</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-09-22T02:52:42Z</dc:date>
    </item>
  </channel>
</rss>

