<?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: Variance Model in PROC MODEL in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43794#M195</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the proc model for estimating a garch model, but I don't know how to extract the volatility estimated.&lt;/P&gt;&lt;P&gt;DO you find the solution to extract the volatility with this procedure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anaïs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 13:52:24 GMT</pubDate>
    <dc:creator>anais</dc:creator>
    <dc:date>2012-07-31T13:52:24Z</dc:date>
    <item>
      <title>Variance Model in PROC MODEL</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43793#M194</link>
      <description>Hi,&lt;BR /&gt;
I am trying to implement various GARCH models using the PROC model statement, but having problems.&lt;BR /&gt;
&lt;BR /&gt;
I am comparing the results from some examples provided in SAS Support:&lt;BR /&gt;
&lt;BR /&gt;
rsubmit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%let df = 7.5;&lt;BR /&gt;
%let sig1 = 1;&lt;BR /&gt;
%let sig2 = 0.1 ;&lt;BR /&gt;
%let var2 = 2.5;&lt;BR /&gt;
%let nobs = 1000 ;&lt;BR /&gt;
%let nobs2 = 2000 ;&lt;BR /&gt;
%let arch0 = 0.1 ;&lt;BR /&gt;
%let arch1 = 0.2 ;&lt;BR /&gt;
%let garch1 = 0.75 ;&lt;BR /&gt;
%let intercept = 0.5 ;&lt;BR /&gt;
&lt;BR /&gt;
data normal;&lt;BR /&gt;
   lu = &amp;amp;var2;&lt;BR /&gt;
   lh = &amp;amp;var2;&lt;BR /&gt;
   do i= -500  to &amp;amp;nobs ;&lt;BR /&gt;
           /* GARCH(1,1) with normally distributed residuals */&lt;BR /&gt;
      h = &amp;amp;arch0 + &amp;amp;arch1*lu**2 + &amp;amp;garch1*lh;&lt;BR /&gt;
      u = sqrt(h) * rannor(12345) ;&lt;BR /&gt;
      y = &amp;amp;intercept + u;&lt;BR /&gt;
      lu = u;&lt;BR /&gt;
      lh = h;&lt;BR /&gt;
      if i &amp;gt; 0 then output;&lt;BR /&gt;
   end;&lt;BR /&gt;
run;&lt;BR /&gt;
 &lt;BR /&gt;
proc autoreg data = normal ;&lt;BR /&gt;
 /* Estimate GARCH(1,1) with normally distributed residuals with AUTOREG*/  &lt;BR /&gt;
   model y = / garch = ( q=1,p=1 ) ;&lt;BR /&gt;
     output out = normal p = pred r = resid  cev = vhat;&lt;BR /&gt;
&lt;BR /&gt;
run ;&lt;BR /&gt;
quit ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 /* Estimate GARCH(1,1) with normally distributed residuals with MODEL*/    &lt;BR /&gt;
proc model data = normal ;&lt;BR /&gt;
    /* mean model */&lt;BR /&gt;
    y = intercept ;&lt;BR /&gt;
    /* variance model */&lt;BR /&gt;
    h.y = arch0 + arch1*xlag(resid.y**2,mse.y) +&lt;BR /&gt;
          garch1*xlag(h.y,mse.y) ;&lt;BR /&gt;
    /* fit the model */&lt;BR /&gt;
    fit y / method = marquardt outall outest = ests out = NORMALB fiml ; ;&lt;BR /&gt;
run ;&lt;BR /&gt;
quit ;&lt;BR /&gt;
endrsubmit;&lt;BR /&gt;
&lt;BR /&gt;
When I look at the Residuals in NORMALB, they do not appear to make sense.  So, I was expecting RESIDUAL to equal PREDICTED - EXPECTED = 0.479 - -1.035 = 1.51 vs the output in NORMALB = -0.864.  Where does this value come from?&lt;BR /&gt;
&lt;BR /&gt;
Also, the PROC AUTOREG model has a nice output parameter cev = zzz which outputs the volatility estimate - is there an equivalend method of extracting volatility estimates from the PROC MODEL h.zzz model for variance.&lt;BR /&gt;
&lt;BR /&gt;
I need to use the PROC MODEL approach rather than PROC AUTOREG as PROC MODEL allows more exotic GARCH models than PROC AUTOREG.&lt;BR /&gt;
&lt;BR /&gt;
Hope somebody can help.&lt;BR /&gt;
Thanks!</description>
      <pubDate>Fri, 12 Jun 2009 07:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43793#M194</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-12T07:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variance Model in PROC MODEL</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43794#M195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the proc model for estimating a garch model, but I don't know how to extract the volatility estimated.&lt;/P&gt;&lt;P&gt;DO you find the solution to extract the volatility with this procedure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anaïs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 13:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43794#M195</guid>
      <dc:creator>anais</dc:creator>
      <dc:date>2012-07-31T13:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variance Model in PROC MODEL</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43795#M196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As for the cev, I think there is an easy way to get. Under PROC MODEL, in FIT statement, check "&lt;STRONG style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;OUTRESID&lt;/STRONG&gt;":&lt;/P&gt;&lt;P&gt;"...&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If the h.var equation is specified, the residual values written to the OUT= data set are the normalized residuals, defined as &lt;/SPAN&gt;&lt;IMG alt="" class="math gen jiveImage" src="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/images/etsug_model0089.png" style="font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; color: #000000; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;, divided by the square root of the h.var value..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;note that &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; font-size: 14px; background-color: #ffffff;"&gt;H.&lt;/SPAN&gt;&lt;EM style="font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; font-weight: bold; color: #000000; font-size: 14px; background-color: #ffffff;"&gt;name&lt;/EM&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; font-size: 14px; background-color: #ffffff;"&gt; variable specifies the functional form for the variance of the named equation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;That means that you can derive h.var (cev) by using actual, predicted, and residual outputs. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hope helpful.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Sep 2014 18:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Variance-Model-in-PROC-MODEL/m-p/43795#M196</guid>
      <dc:creator>matdotzhou</dc:creator>
      <dc:date>2014-09-06T18:19:22Z</dc:date>
    </item>
  </channel>
</rss>

