series correlation can't be solved

Discussions of ARCH, GARCH, and related models
huanpipt
Posts: 26
Joined: Sun Mar 27, 2011 7:52 am

series correlation can't be solved

Unread post by huanpipt »

TC_C1.xls
(139.5 KiB) Downloaded 874 times
I try to do a VECM-GARCH(1,1)model.
However, the series correlation problems become more serious when I add more lag terms.
I've tried to use the BHHH method and change the parameters, p and q.
I want to ask how to adjust in order to solve this problem.
Thanks.

Code: Select all

open data TC_C1.xls
CALENDAR(irregular)
data(format=xls,org=columns) /  Lsp Lf1m
set dLSP = LSP - LSP{1}
set dLF1M = LF1M - LF1M{1}
******************************************************************************
***************************VAR-GARCH-M Model**************************
******************************************************************************
linreg LSP / ecteq
# LF1M

SYSTEM(MODEL=VAR)
VARIABLES DLSP DLF1M
LAGS 1 to 2
DET Constant ecteq{1}
END(SYSTEM)
ESTIMATE(residuals=resids)

garch(model=var,mv=bekk,iters=100,hmatrices=hv,rvectors=rv,p=1,q=1,piters=10, method=bfgs,pmethod=bhhh) / dLSP dLF1M
set RESIDSS = rv(t)(1)/sqrt(hv(t)(1,1))
set RESIDSF = rv(t)(2)/sqrt(hv(t)(2,2))
corrlated(number=12,span=4,qstats) residss
corrlated(number=12,span=4,qstats) residsf
set residssq = residss**2
set residsfq = residsf**2
corrlated(number=12,span=4,qstats) residssq
corrlated(number=12,span=4,qstats) residsfq
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: series correlation can't be solved

Unread post by TomDoan »

You should never use BHHH as a PMETHOD. BHHH is fine as a finishing method, but the whole problem with it is that it gets the curvature of the function wrong except when it gets near the optimum. If you switch to PMETHOD=SIMPLEX, your model should converge.

In adjusting p and q, you're trying to fix the wrong "problem". Your diagnostics are fine on the squared standardized residuals; it's the standardized residuals themselves that have a problem with lack of whiteness. If that's fixable, it's by increasing the number of lags in the VECM, not in the GARCH model, and with 1000+ data points, a one lag VECM seems a bit short. However, with 1000+ data points, it's very easy to have a significant Q without having any obvious problems with the model. The asymptotic standard error of an autocorrelation of white noise with 1000 data points is around .03, so .08 is "big". And yet, it's not likely that you could adjust a VAR to get rid of something that's in reality fairly small.
ibrahim
Posts: 20
Joined: Wed Mar 20, 2013 10:50 am

Re: series correlation can't be solved

Unread post by ibrahim »

Hi Tom,
Actually, I want to see the volatility spillover between spot and futures markets with VECM MGARCH BEKK model. And I applied the below code to different data sets. Except one data set, all the models LB-Q and LB-Q^2 tests are insignificant, and also p value of ARCH LM tests is insignifincat. But one model residuals LB Q^2 stats p value is significant with ARCH LM test pvalue, although LB-Q stats is insignificant for this model. What should I do? (I have four data sets, including 75000,70000,25000 and 180000 observations.

SET DSCP =LOG(a)-LOG(a{1})
SET DSFP =LOG(b)-LOG(b{1})
SET ECT =LOG(a)-LOG(b)
system(model=vecmmodel)
variables dscp dsfp
lags 1 to 19
det constant ect{1}
end(system)
garch(model=vecmmodel, p=1,q=1,mv=bekk,method=bfgs,iters=200,pmethod=simplex,piters=10,resids=m)

corr(qstats,number=12) m
set n = m**2
corr(qstats,number=12) n
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: series correlation can't be solved

Unread post by TomDoan »

ibrahim wrote:Hi Tom,
Actually, I want to see the volatility spillover between spot and futures markets with VECM MGARCH BEKK model. And I applied the below code to different data sets. Except one data set, all the models LB-Q and LB-Q^2 tests are insignificant, and also p value of ARCH LM tests is insignifincat. But one model residuals LB Q^2 stats p value is significant with ARCH LM test pvalue, although LB-Q stats is insignificant for this model. What should I do? (I have four data sets, including 75000,70000,25000 and 180000 observations.

SET DSCP =LOG(a)-LOG(a{1})
SET DSFP =LOG(b)-LOG(b{1})
SET ECT =LOG(a)-LOG(b)
system(model=vecmmodel)
variables dscp dsfp
lags 1 to 19
det constant ect{1}
end(system)
garch(model=vecmmodel, p=1,q=1,mv=bekk,method=bfgs,iters=200,pmethod=simplex,piters=10,resids=m)

corr(qstats,number=12) m
set n = m**2
corr(qstats,number=12) n
There are a couple of issues. First, with 25000 data points (or even more), statistically significant and econometrically fixable often have little to do with each other. With that many data points, I'd be shocked if your residual ARCH test didn't fail at conventional significance levels. If you look at the earlier post where I was talking about 1000 data points, consider that with 25000, the standard error on a correlation is 5 times smaller.

More important, you're doing a test for residual GARCH on the residuals from the mean model. Those should have GARCH effects in them. You need to test the standardized residuals for GARCH, not the raw mean model residuals.
ibrahim
Posts: 20
Joined: Wed Mar 20, 2013 10:50 am

Re: series correlation can't be solved

Unread post by ibrahim »

Hi Tom,
Thank you so much for detailed explanation.
Actually, first I estimated a VECM model and save the residuals. Then I just ran these residuals in a MGARCH BEKK model in RATS with the below code.

Code: Select all

garch(model=varmodel, p=1,q=1,mv=bekk,method=bfgs,iters=200,pmethod=simplex,piters=10, resids=m)
I thougt by including "resids=m" in equation, I will get standardized resiuals.
I am new in RATS and also in programming, could you please share the codes to get standardized resiuals? Or how will I run LB-Q and LB-Q^2 tests after mgarch bekk model?
Sorry about these basic questions!
Thank you very much Tom.

Ibrahim
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: series correlation can't be solved

Unread post by TomDoan »

No. The residuals are just from the mean model. With multivariate models, there is no single standardization. See the discussion on page UG-303 of the RATS v8 User's Guide. If you search the forum for MVARCHTEST, you'll see some other examples, including one which is just a few threads earlier in the "ARCH and GARCH Models" forum.
ibrahim
Posts: 20
Joined: Wed Mar 20, 2013 10:50 am

Re: series correlation can't be solved

Unread post by ibrahim »

Hi Tom,
Thank you very much for the instructions.
As you said, I examined the related pages in the user guide.
And applied the LB-Q and LB-Q^2 tests to standardized residuals.
But after applying the below code;

Code: Select all

set z1 = rd(t)(1)/sqrt(hh(t)(1,1))
set z2 = rd(t)(2)/sqrt(hh(t)(2,2))
I get an error as seen below:
"## MAT15. Subscripts Too Large or Non-Positive"
Then I searched the forum and I saw some of your instructions for this error. And I adjusted the below code.

Code: Select all

set z1 %regstart() %regend() = rd(t)(1)/sqrt(hh(t)(1,1))
set z2 %regstart() %regend() = rd(t)(2)/sqrt(hh(t)(2,2))
Then error is resolved. Could you please check the above code?
And another question is for diagnostic test, LB-Q test p value is 0.006903 and LB-Q^2 test p value is 1.0000 and also ARCH LM test p value is 0.99999
How can I interpret these diagnostic results? Could the model be correctly specified?
I really appreciate all your help, I made progress by your help.
Ibrahim
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: series correlation can't be solved

Unread post by TomDoan »

If you still have the 25000 or so data points, the Q is probably fine. The statistics on the Q^2's don't look right though---they're way too good which usually means there's something wrong. Typically, you get a Q very very near zero only if you have a huge outlier.
ibrahim
Posts: 20
Joined: Wed Mar 20, 2013 10:50 am

Re: series correlation can't be solved

Unread post by ibrahim »

Hi Tom,
The Q statistiscs p values are for 18 lags at my last post. If I select below lags, the p values are like 0.995 rather than 1.0000
My problem is selecting the lag order for Q statistics.
I have intraday 1 minute data and also daily and weekly data. The intraday data sets includes at least 10000 data. The other data sets are between 150 and 800.
I know there is no specific lag selection rule approved by all econometricians. But it seems logical to select at least bigger than VAR or VECM lag order for Q stats.
My VECM models lag orders are 14,15. So, I thought that I could select 18 lags after MGARCH BEKK model for Q stats.
I am confused and need help!
Thanks Tom,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: series correlation can't be solved

Unread post by TomDoan »

ibrahim wrote:Hi Tom,
The Q statistiscs p values are for 18 lags at my last post. If I select below lags, the p values are like 0.995 rather than 1.0000
My problem is selecting the lag order for Q statistics.
I have intraday 1 minute data and also daily and weekly data. The intraday data sets includes at least 10000 data. The other data sets are between 150 and 800.
I know there is no specific lag selection rule approved by all econometricians. But it seems logical to select at least bigger than VAR or VECM lag order for Q stats.
My VECM models lag orders are 14,15. So, I thought that I could select 18 lags after MGARCH BEKK model for Q stats.
I am confused and need help!
Thanks Tom,
You'd have to post your program and data so I can see just what you're dealing with.
ibrahim
Posts: 20
Joined: Wed Mar 20, 2013 10:50 am

Re: series correlation can't be solved

Unread post by ibrahim »

Hi Tom,

The below is the code bivariate GARCH BEKK model. I applied this code to VECM residuals.

Code: Select all

garch(p=1,q=1,mv=bekk,method=bfgs,iters=200,pmethod=simplex,piters=10,$
hmatrices=hh,rvectors=rd) / ise sp

Then for standardized residuals I applied the below code,

Code: Select all

set z1 %regstart() %regend() = rd(t)(1)/sqrt(hh(t)(1,1))
set z2 %regstart() %regend() = rd(t)(2)/sqrt(hh(t)(2,2))
Then for LB-Q (12) and LB-Q^2 (12) tests I applied the below codes

Code: Select all

corr(qstats,number=12) z1 
set n = z1**2
corr(qstats,number=12) n 
And for ARCH LM test the below code

Code: Select all

lin n
# constant n{1 to 12}
compute trsq = %nobs*%rsquared
disp 'ARCH LM test:'
cdf chisqr trsq 12
I send the data to support@estima.com for your information.
Thank you for your help Tom,
I really appreciate it.

Ibrahim
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: series correlation can't be solved

Unread post by TomDoan »

You sent the data file with the 75000 observations. Though I don't have precisely your model, I got this result from 20 lags on the standard L-B Q:

Code: Select all

Correlations of Series Z1

Autocorrelations
   1         2          3         4        5        6        7        8        9        10
-0.00843   -0.00137    0.00249 -0.00152 -0.00120 -0.00184 -0.00264 -0.00230 -0.00356 -0.00470
   11        12         13        14       15       16       17       18       19       20
-0.00326   -0.00300   -0.00431 -0.00472 -0.00627 -0.00594 -0.00924 -0.01403 -0.00328 -0.00334

Ljung-Box Q-Statistics
    Lags  Statistic Signif Lvl
      20     42.803   0.002171
As you can see, that's "significant" at the conventional .05 level, but the actual correlations are quite small. The one that "triggers" the significant result is #18 at a whopping -.014. No adjustment that you make on the model is going to get rid of that. That's why I was talking about the difference between being statistically significant and econometrically fixable---this isn't "fixable" and there's no reason to think that it really casts doubt on the model.

One thing to note, however, is that the model has some really enormous outliers. Z1 (theoretically) should have roughly mean zero and variance one, which it does. However, it has a J-B statistic of about 10000000. Really fat tails. The L-B test assumes that away, so there is no reason to base results on its asymptotics. The West-Cho test is a better alternative.
ibrahim
Posts: 20
Joined: Wed Mar 20, 2013 10:50 am

Re: series correlation can't be solved

Unread post by ibrahim »

Dear Tom,
Thank you so much for all your help,
I can not express my appreciation.

Best,
Ibrahim
Post Reply