Page 1 of 1

GARCH-M with implied volatility only

Posted: Wed Jul 25, 2012 6:13 am
by DJM
Hello,

I am estimating a GARCH(1,1) model and it has an additional variance regressor. I want to obtain the likelihood ratio value when there are no ARCH or GARCH terms - so I only have the implied volatility appearing in the variance regressor.

This is my first attempt at programming ever and any guidance/pointers are much appreciated. I have not completely understood everything yet and am still reading. I have been using the samples provided as well.

NOTE: I am NOT asking someone to write the code for me - just practical help.

I am using Eviews 7.

Code: Select all

' GARCH-M with constant and implied volatility in the conditional variance equation ' change path to program path %path = @runpath cd %path ' load workfile load new thesis approach series y = logsp ' set sample (1/02/1990-12/31/1996) sample s0 1/02/1990 12/31/1996 ' get starting values from Gaussian GARCH-M equation eq1 eq1.arch(0,0,garch,archm=var, logvix) y c show eq1.output ' declare and initialize parameters coef(1) lambda0 = eq1.c(1) coef(1) lambda1 = eq1.c(2) coef(1) mu = eq1.c(3) ' set presample values of expressions in logl smpl s0 series sig2 = omega(1) series res = 0 ' set up GARCH likelihood logl ll1 ll1.append @logl logl ll1.append res = y-mu(1) ll1.append sig2 = omega(1)+alpha(1)*res(-1)^2 +beta(1)*sig2(-1) ll1.append z = res^2/sig2/(tdf(1)-2) + 1 ll1.append logl = @gammalog((tdf(1) + 1)/2) - @gammalog(tdf(1)/2) - log(!pi)/2 - log(tdf(1) - 2)/2 - log(sig2)/2 - (tdf(1)+1)*log(z)/2 ' estimate and display output smpl s1 ll1.ml(showopts, m=1000, c=1e-5)
Thank you for your help

Re: GARCH-M with implied volatility only

Posted: Wed Jul 25, 2012 8:40 am
by EViews Gareth
Hard to tell you how to improve your current program if you don't explain why it isn't doing what you want it to do.