GARCH specification, Error when computing Estimates
1 次查看(过去 30 天)
显示 更早的评论
Hey everyone,
I am recently encountering many problems with my implementation of a GARCH(1,1) model and I do not know how to solve them:
My data consists of returns (with no NaN Values) and I am performing rolling regressions on a 60 month basis. So the return column vector I create is of the form (1,60) for each asset.
I now define my GARCH model:
Mdl = egarch(1,1);
and now when I try to estimate the model using the data I unfortunately cannot move forward:
EstMdl = estimate(Mdl,return_vector);
as MATLAB returns the error message:
Estimated GARCH model is invalid.
Caused by: Error using garch/validateModel (line 782) Non-zero degree P requires a non-zero degree Q.
It also does not work when de-meaning my data and I am seriously stuck with this for quite a while now..
I really appreciate any help!
Thanks already!
EDIT: I guess I could even provide more info on my data:
I found this piece of code online which works perfectly:
load Data_MarkPound
r = price2ret(Data);
pR = 100*r;
T = length(r);
Mdl = garch(1,1);
EstMdl = estimate(Mdl,pR);
now, the only difference in my opinion is the length of the returns (and the fact that they have been created with the price2ret function and mine are directly from CRSP) now, the data of one of the stocks that I have issues with are as follows:
EDIT2:
I have now noticed that for some assets the GARCH estimation works, however it delivers unplausible results such as ARCH and GARCH values of -0.6 and -0.6. Also in the cases where the GARCH model does not work, I am able to use a eGARCH. This as well delivers disillusional results as above.
I have come to the conclusion, that my returns need to be transformed somehow, but I do not know what the exact problem is....
0 个评论
采纳的回答
Sruthi Ayloo
2015-8-17
编辑:Sruthi Ayloo
2015-8-18
Hi Clemens,
This error is caused by limitations on the numerical maximum likelihood. The warning message suggests that the segments of the data to which the GARCH model is fit are getting stuck at suboptimal, local maxima, which drives the ARCH coefficient (and in turn the model parameter Q) to zero. Because Q becomes zero, there is no way for the observed data to affect its own volatility (which is the point of GARCH models), and MATLAB returns an error.
There are three things to check if you are running to similar issues:
1. Make sure that the data itself is well-suited for GARCH analysis.
2. Try switching to a different solver. The FMINCON function uses one of four algorithms to do its job ('sqp', 'interior-point', 'active-set', 'trust-region-reflective'). You can set the solver algorithm by the following syntax:
model = garch(1,1);
ret = your_data;
opts = optimset('fmincon');
opts.Algorithm = 'interior-point';
% use this variable when calling the ESTIMATE function
fit = estimate(model, ret, 'options',opts);
For more information on the FMINCON function and its different options for the 'Algorithm' option, refer to the following documentation:
3. Try manually setting the starting parameters (such as Constant0, GARCH0, and ARCH0) in the ESTIMATE command, using the values of "Constant", "GARCH", and "ARCH" obtained from the previous iteration. You can set the starting parameters by using the following syntax:
constant = obtained_from_previous_iteration;
g0 = obtained_from_previous_iteration;
a0 = obtained_from_previous_iteration;
fit = estimate(model, ret, 'options',opts,'Constant0',constant,'GARCH0',g0,'ARCH0',a0);
For more information about setting the starting parameters of the GARCH model estimation, refer to the following documentation:
Hope this helps.
Thanks!
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Conditional Variance Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!