DCC GARCH implementation

18 views (last 30 days)
Tesero
Tesero on 13 Jan 2012
Answered: RP on 13 Jan 2018
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 Comments
Javier
Javier on 4 Dec 2012
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
Angelos Pazaitis on 15 Nov 2016
Edited: Angelos Pazaitis on 15 Nov 2016
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

Sign in to comment.

Answers (1)

RP
RP on 13 Jan 2018
Hi,
I am using matlab 2017 version. I have 1 query that is MFE-toolbox additionally installed in matlab 2017 version?
Please suggest.

Categories

Find more on Conditional Variance Models in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!