BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hjosephkim
Calcite | Level 5

My question is how to make code when I model GARCH volatility by adding explanatory variable.

For example, I would like to add variable X(short-term interest rate) in the conditional variance equation of stock market return (Y). This means that the volatility of stock market returns at time t is affected by short-term interest rate at time t. Please let me know the code sample, assuming simple GARCH(1,1) model.

1 ACCEPTED SOLUTION

Accepted Solutions
kessler
SAS Employee

Yes.  The equivalent AUTOREG code for the MODEL code I supplied is:

proc autoreg data=drate;

   model y = / garch=(p=1,q=1);

   hetero x / coef=nonneg;

run;

View solution in original post

3 REPLIES 3
kessler
SAS Employee

Here's an example of a GARCH(1,1) model using PROC MODEL which includes a simple linear dependence of the volatility on interest rate.  The data set 'drate' would contain an endogenous variable 'y' of stock market returns, and 'x' of interest rates.

proc model data=dratee;

   /* Mean model */
   y = sret;

   /* Variance model ----------------*/
   h.y = b*x
         + arch0 + arch1*xlag(resid.y**2, mse.y) + garch1*xlag(h.y, mse.y);

   bounds b arch0 arch1 garch1 >= 0;

   fit y / fiml;
quit;

hjosephkim
Calcite | Level 5

Thanks a lot. Then can I also try PROC AUTOREG with HETERO option?

For example,

PROC AUTOREG DATA=RETURN;

MODEL Y=A B / GARCH=(P=1,Q=1);

HETERO TBOND;

RUN;

kessler
SAS Employee

Yes.  The equivalent AUTOREG code for the MODEL code I supplied is:

proc autoreg data=drate;

   model y = / garch=(p=1,q=1);

   hetero x / coef=nonneg;

run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2370 views
  • 0 likes
  • 2 in conversation