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.

Any assistance will be greatly appreciated.

6 REPLIES 6
ChrisHemedinger
Community Manager

Moved this to so that the experts will see it.

Chris

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
SteveDenham
Jade | Level 19

The JT test is dependent on discordant observations for ordinal categories, so it will definitely need more observations than the 3 mentioned (I assume that is a sample, and not the whole dataset).  PROC FREQ offers the JT test, including an exact test.

Newey-West and GARCH models are implemented in the SAS/ETS package.  The good folks in the Forecasting and Econometrics forum will have a much better chance of being to answer your questions about which PROCs to implement to meet your goals

Steve Denham.

Thaarb
Calcite | Level 5

Hi Steve,

Thanks so much for your response. Yes- that is just a sample.. Do you know the exact syntax for the proc freq test?

Regards,

Terri

     

SteveDenham
Jade | Level 19

Hi Terri,

To make a JT test work, you'll probably need to code volatility into some sort of ordinal variable.  Deciles would make sense.  Also, I am assuming time to maturity doesn't take on too many values, or it too would have to be coded.  Once that is done, you could then run:

proc freq data=yourcodeddata;

tables time*volatility_decile/jt;

run;

If there are not too many levels of the two variables, you could get an exact test with:

proc freq data=yourcodeddata;

tables time*volatility;

exact jt;  /* You could add the mc option after a slash here to get a Monte Carlo simulation, if execution time seems inordinate  */

run;

Steve Denham

Message was edited by: Steve Denham

Thaarb
Calcite | Level 5

Thanks Steve - that works perfectly. Smiley Happy

For the second test i.e. the Newy West Heteroskedasticity Consistent Covariance Procedure  where by I need to regress the daily future realised volatility on a constant and the number of days until the contract matures do you know how I would do this?

Kind regards,

Terri


SteveDenham
Jade | Level 19

Definitely outside my usual work, but a search of the documentation points to PROC AUTOREG or PROC MODEL in SAS/ETS.  At this point, your best bet would be to ask the Forecasting and Econometrics forum for help.

Steve Denham

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1893 views
  • 1 like
  • 3 in conversation