DCC GARCH implementation
10 次查看(过去 30 天)
显示 更早的评论
Hello, here's my problem.
I have a matrix with 3194 observations for 52 stock series [3194,52]. I need to calculate the conditional correlation between all the series... I tried to use the DCC model (function dcc_mvgarch of the UCSD GARCH package) as shown in my notes:
[p, lik, h]=dcc_mvgarch(LRDATASET,1,1,1,1);
Of course the notes were for a different dataset, and I knew I could expect some kind of error. I was hoping to understand the problem from the error, however I get a series of long warning message (always the same):
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. > In dcc_mvgarch_full_likelihood at 79 In dcc_mvgarch at 114
At the end I get a message error:
??? Error using ==> mpower Input to EIG must not contain NaN or Inf.
Error in ==> dcc_mvgarch at 122 stdresid(i,:)=data(i,:)*Ht(:,:,i)^(-0.5);
The first errors is really bothering me, since in LRDATASET there are no value inf or nan...
I have serious problems to understand the entire formula, so probably I'm doing something of very stupid, like mixing apple with orange. Any help would very much appreciated.
Thank you very much!
2 个评论
Javier
2012-12-4
Before anything, check the data base for NaN observations. If you have price data in LRDATASET, check for zero data. This will give you Inf because division by zero is no defined when estimate the return series.
Step 1) Estimate Return Series.
Step 2) Verify structure in mean and sigma data. If daily data, to verify structure in mean use autocorr(return_data) and for sigma autocorr(return_data.^2). Another procedure is to perform a lbqtest of each data serie and verify that the H0 is not rejected.
Step 3) If structure in mean, adjust the mean and get residuals. Residuals will be used in the estimation of the BEKK.
step 4) Estimate the DCC. It should work and take a lot of time.
If have any doubt please post a comment.
Angelos Pazaitis
2016-11-15
编辑:Angelos Pazaitis
2016-11-15
Hi,
what do you mean by "Step 1) Estimate Return Series" exactly?
Compute the returns from the price series? Like the simple returns or log-returns?
Thanks
回答(1 个)
RP
2018-1-13
Hi,
I am using matlab 2017 version. I have 1 query that is MFE-toolbox additionally installed in matlab 2017 version?
Please suggest.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Financial Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!