BookmarkSubscribeRSS Feed
Thaarb
Calcite | Level 5

Hi all,

My data currently look like this:

Time To Maturity          Volatility   

1                                  0.65   

2                                  0.21   

3                                  0.33

I am looking to run the following three tests on my data and want to make sure I am doing so correctly.

1.Jonckheere-Terpstra test     To examine if the volatility increases as a contract approaches maturity

2.Newy West Heteroskedasticity Consistent Covariance Procedure     To regress the daily future realised volatility on a constant and the number of days until the contract matures.

3.GARCH (1, 1) model 

I want to make sure I am coding this correctly in order to ascertain that the results are correct. I have managed to get answer on how to run my first test from the SAS Statistical Discussion, any assistance on how to run the 2nd and 3rd test will be appreciated.

Thanks

7 REPLIES 7
ChaseO
Calcite | Level 5

Hi Thaarb, for #3...

PROC AUTOREG DATA=work.data;

     MODEL y = x / GARCH=(q=1,p=1);

RUN;

Details in the ETS documentation --> SAS/ETS(R) 13.2 User's Guide

ets_kps
SAS Employee

Hi Thaarb,

For Newey-west SE's.

PROC AUTOREG DATA=work.data;

     MODEL y = x / GARCH=(q=1,p=1) covest=neweywest;

RUN;

For #1, look here SAS/STAT(R) 14.1 User's Guide

You'll have to estimate that test statistic outside AUTOREG.  (Oh i just saw your note.  Oh well, for everyone else and me Smiley Happy)

Ken

Thaarb
Calcite | Level 5

Thank you for your responses.

When I attempt the test for Newey West as specified above it brings the following error:

ERROR: Procedure AUTOREG not found.

Do you know how could go about fixing this?

SteveDenham
Jade | Level 19

It looks like the SAS instance that you are using does not have SAS/ETS installed.  In particular, if you are using the University Edition, it does not support SAS/ETS procedures.

Steve Denham

ets_kps
SAS Employee

The short answer is that you do not have SAS/ETS installed.  If you are interested in licensing that module, follow this link. 

How to Buy SAS Software | SAS

If you are a student or using the product for human capital purposes (non revenue generating) then you can access "cloud SAS" here. SAS® Logon Manager

All you need to do is sign up for an account.

Best of luck-Ken

Thaarb
Calcite | Level 5

Thanks for all your assistance - it is greatly appreciated. I have managed to run all three tests, but I have a question relating to the confidence interval... How do I know what the confidence interval is that the tests are assuming? Or do I have to specify one? If so where?

 

Thanks in advance

 

Terri

Thaarb
Calcite | Level 5

Hi Ken,

 

Thanks for the information regarding the Newey-West test. Do you know how I add in another dependent variable into the regression?

 

As when I try to do it currently it bring up an error.

 

Thanks

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 7 replies
  • 2395 views
  • 0 likes
  • 4 in conversation