Missing values in LOGL series under Bivariate GARCH
Moderators: EViews Gareth, EViews Moderator

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Missing values in LOGL series under Bivariate GARCH
Hi all,
I am estimating Dynamic Conditional Correlation under Bivariate GARCH in Eviews5. I could not find the DCC output as it is showing "there are missing values in the LOGL series". What could be the possible reason. Though there are already discussion of this type in the forum, I could not clarify myself. I would be grateful, if anybody helps me out.
Thanks and regards
Atish
I am estimating Dynamic Conditional Correlation under Bivariate GARCH in Eviews5. I could not find the DCC output as it is showing "there are missing values in the LOGL series". What could be the possible reason. Though there are already discussion of this type in the forum, I could not clarify myself. I would be grateful, if anybody helps me out.
Thanks and regards
Atish
Re: Missing values in LOGL series under Bivariate GARCH
Although posting your workfile would be much better for us to understand the problem, I think you probably forgot assigning initial values to some series and/or adjusting the sample period accordingly.

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Re: Missing values in LOGL series under Bivariate GARCH
Thank you very much. What are the criteria to be considered in giving the initial values.
As you suggested, I am attaching the workfile soon.
As you suggested, I am attaching the workfile soon.
Re: Missing values in LOGL series under Bivariate GARCH
By "assigning initial values", I mean the first few values of a series in the sample. If you have a dynamic equation in your model, then your estimation cannot begin until you supply the initial values. For instance, if you have a variable that depends on its own (or on some other variables') lags, then you should specify as many initial values as the number of lags beforehand. In order to do that, you should adjust your sample (e.g. smpl 1 1) and then assign the initial value (e.g. y = 0). Do not forget to reset your sample period after you specified the initial values (e.g. smpl @all).

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Re: Missing values in LOGL series under Bivariate GARCH
Hi ,
Find attached the workfile where I was trying to get Dynamic Conditional Correlation under Bivariate GARCH. As I had mention earlier I am getting error message "Missing values in LOGL series in current observation".
Kindly let me know my mistakes and if possible give me the detailed guidelines.
Find attached the workfile where I was trying to get Dynamic Conditional Correlation under Bivariate GARCH. As I had mention earlier I am getting error message "Missing values in LOGL series in current observation".
Kindly let me know my mistakes and if possible give me the detailed guidelines.
Re: Missing values in LOGL series under Bivariate GARCH
This workfile seems to be generated by a program code. In order to correctly identify the problem, the code (if there is one) is needed as well. However, it seems the estimation sample covers only the first observation, which may be the cause. You may have forgotten to adjust your sample before running the estimation. If you have initialized all the variables properly, then the estimation should start right after the initialization period (e.g. smpl @first+1 @last).

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Re: Missing values in LOGL series under Bivariate GARCH
Hi
The code I used is as given below. let me know where I have to change. I also don't know how to do with the menu. Can you please tell me the the procedure with menu so that I don't have to use codes.
With many Thanks and regards
Atish
series r1=nasdaq_return
series r2=bse_return
sample s1 1/3/2000 6/2009
scalar pi=3.14159
equation eq_r1.arch(1,1,m=1000,h) r1 c
equation eq_r2.arch(1,1,m=1000,h) r2 c
eq_r1.makeresids(s) z1
eq_r2.makeresids(s) z2
eq_r1.makegarch() garch1
eq_r2.makegarch() garch2
scalar var_z1=@var(z1)
scalar var_z2=@var(z2)
scalar cov_z1z2=@cov(z1,z2)
scalar corr12=@cor(z1,z2)
series var_z1t=var_z1
series var_z2t=var_z2
series cov_z1tz2t=cov_z1z2
coef(2) T
T(1)=0.2
T(2)=0.7
logl dcc
dcc.append @logl logl
dcc.append var_z1t=@nan(1T(1)T(2)+T(1)*(z1(1)^2)+T(2)*var_z1t(1),1)
dcc.append var_z2t=@nan(1T(1)T(2)+T(1)*(z2(1)^2)+T(2)*var_z2t(1),1)
dcc.append cov_z1tz2t=@nan((1T(1)T(2))*corr12+T(1)*z1(1)*z2(1)+T(2)*cov_z1tz2t(1),1)
dcc.append pen=(var_z1t<0)+(var_z2t<0)
dcc.append rho12=cov_z1tz2t/@sqrt(@abs(var_z1t*var_z2t))
dcc.append detrRt=(1(rho12^2))
dcc.append detrDt=@sqrt(garch1*garch2)
dcc.append pen=pen+(detrRt<0)
dcc.append detrRt=@abs(detrRt)
dcc.append detrRt=(1(rho12^2))
dcc.append detrDt=@sqrt(garch1*garch2)
dcc.append logl=(1/2)*(2*log(2*pi)+log(detrRt)+(z1^2+z2^22*rho12*z1*z2)/detrRt)10*pen
sample s1
scalar pi=3.14159
smpl s1
dcc.ml(showopts, m=500, c=1e5)
show dcc.output
The code I used is as given below. let me know where I have to change. I also don't know how to do with the menu. Can you please tell me the the procedure with menu so that I don't have to use codes.
With many Thanks and regards
Atish
series r1=nasdaq_return
series r2=bse_return
sample s1 1/3/2000 6/2009
scalar pi=3.14159
equation eq_r1.arch(1,1,m=1000,h) r1 c
equation eq_r2.arch(1,1,m=1000,h) r2 c
eq_r1.makeresids(s) z1
eq_r2.makeresids(s) z2
eq_r1.makegarch() garch1
eq_r2.makegarch() garch2
scalar var_z1=@var(z1)
scalar var_z2=@var(z2)
scalar cov_z1z2=@cov(z1,z2)
scalar corr12=@cor(z1,z2)
series var_z1t=var_z1
series var_z2t=var_z2
series cov_z1tz2t=cov_z1z2
coef(2) T
T(1)=0.2
T(2)=0.7
logl dcc
dcc.append @logl logl
dcc.append var_z1t=@nan(1T(1)T(2)+T(1)*(z1(1)^2)+T(2)*var_z1t(1),1)
dcc.append var_z2t=@nan(1T(1)T(2)+T(1)*(z2(1)^2)+T(2)*var_z2t(1),1)
dcc.append cov_z1tz2t=@nan((1T(1)T(2))*corr12+T(1)*z1(1)*z2(1)+T(2)*cov_z1tz2t(1),1)
dcc.append pen=(var_z1t<0)+(var_z2t<0)
dcc.append rho12=cov_z1tz2t/@sqrt(@abs(var_z1t*var_z2t))
dcc.append detrRt=(1(rho12^2))
dcc.append detrDt=@sqrt(garch1*garch2)
dcc.append pen=pen+(detrRt<0)
dcc.append detrRt=@abs(detrRt)
dcc.append detrRt=(1(rho12^2))
dcc.append detrDt=@sqrt(garch1*garch2)
dcc.append logl=(1/2)*(2*log(2*pi)+log(detrRt)+(z1^2+z2^22*rho12*z1*z2)/detrRt)10*pen
sample s1
scalar pi=3.14159
smpl s1
dcc.ml(showopts, m=500, c=1e5)
show dcc.output
Re: Missing values in LOGL series under Bivariate GARCH
As I mentioned before, your problem is due to sample adjustment. I guess the dating of the original workfile (i.e. daily) is different from the one you uploaded here (i.e. integer). Anyway, just adjust your sample object to begin with the second observation and declare it just before the estimation:
You have to set up a System object to estimate a multivariate GARCH model in EViews (as of version 6.0). I created one for Diagonal VECH estimation and saved it as "sys01" into your workfile. See the attached file and the manual for details...
Code: Select all
sample s1 2 2261
...
...
smpl s1
...
...
smpl @all 'do not forget to adjust your sample
You have to set up a System object to estimate a multivariate GARCH model in EViews (as of version 6.0). I created one for Diagonal VECH estimation and saved it as "sys01" into your workfile. See the attached file and the manual for details...
 Attachments

 atish_menu.WF1
 (65.51 KiB) Downloaded 1224 times

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Re: Missing values in LOGL series under Bivariate GARCH
Thanks a lot. I shall get back to you again if I come across the same problem.
Thank you again
best regards
Atish
Thank you again
best regards
Atish

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Re: Missing values in LOGL series under Bivariate GARCH
Hi,
I worked on the edited workfile which you had sent to me. Herewith, I am attaching the DCC result. Kindly let me know if it is correct.
I also do not exactly know how to get the correlation coefficienct from the output. This is for the first time I am computing DCC.
It would be of great help if you could guide me in this regard.
Thanks and regards
Atish
I worked on the edited workfile which you had sent to me. Herewith, I am attaching the DCC result. Kindly let me know if it is correct.
I also do not exactly know how to get the correlation coefficienct from the output. This is for the first time I am computing DCC.
It would be of great help if you could guide me in this regard.
Thanks and regards
Atish
Re: Missing values in LOGL series under Bivariate GARCH
Changing the initial values of coefficient vector T might work. The variable you are looking for is already saved in your workfile under the name rho12.
However, I am really not sure if the code is correct and works properly. I have some doubts regarding the loglikelihood specification. The variables used in the estimation are covariances instead of correlations. Besides, there should be another coefficient to be estimated (i.e. the scalar named corr12). So, at this point, I think it would be better for you to discuss it with the original author of the code or write your own from the scratch.
However, I am really not sure if the code is correct and works properly. I have some doubts regarding the loglikelihood specification. The variables used in the estimation are covariances instead of correlations. Besides, there should be another coefficient to be estimated (i.e. the scalar named corr12). So, at this point, I think it would be better for you to discuss it with the original author of the code or write your own from the scratch.

 Posts: 10
 Joined: Tue Jun 02, 2009 3:57 am
Re: Missing values in LOGL series under Bivariate GARCH
Hi
Thanks a lot for the suggestation. It works after changing the initial values. But, the correlation pattern also changes. Is there any specific criteria to give the initial values of the coefficients and Pi? Further, Can you please let me know  how to set up a System object to estimate a multivariate GARCH model e.g Diagonal VECH or BEKK.
With best regards
Atish
Thanks a lot for the suggestation. It works after changing the initial values. But, the correlation pattern also changes. Is there any specific criteria to give the initial values of the coefficients and Pi? Further, Can you please let me know  how to set up a System object to estimate a multivariate GARCH model e.g Diagonal VECH or BEKK.
With best regards
Atish
Re: Missing values in LOGL series under Bivariate GARCH
Initial values are important only because they ease the convergence especially for nonlinear estimations and help avoid local optima. Whatever initial values you supply, the estimation should yield the same result if the solution is global optimum. Therefore, even if you find a better way to assign initial values, you should still try different values.
You should go "Object/New Object/System" to set up a system object and select the "ARCHConditional Heteroskedasticity" for multivariate ARCH modeling. I've already uploaded a sample workfile in the 8th post of this thread.
You should go "Object/New Object/System" to set up a system object and select the "ARCHConditional Heteroskedasticity" for multivariate ARCH modeling. I've already uploaded a sample workfile in the 8th post of this thread.
Re: Missing values in LOGL series under Bivariate GARCH
trubador wrote:Initial values are important only because they ease the convergence especially for nonlinear estimations and help avoid local optima. Whatever initial values you supply, the estimation should yield the same result if the solution is global optimum. Therefore, even if you find a better way to assign initial values, you should still try different values.
You should go "Object/New Object/System" to set up a system object and select the "ARCHConditional Heteroskedasticity" for multivariate ARCH modeling. I've already uploaded a sample workfile in the 8th post of this thread.
HI!
which is the method to change the initial values (t(1) and t(2))?
Re: Missing values in LOGL series under Bivariate GARCH
hi, i am student and now i'm working on dissertation (the effect of inflation uncertainty on economics growth . i use GPI as inflation and real GDP as growth )
i also have the same problem. i try to solve but it doesn't work! could anyone help ASAP!
i'd like to estimate from 1981q1 to 2012q4.
here my model
smpl @all
series r1 = lncpilncpi(1)
series r2 = lngdplncpi(1)
sample s0 1981q1 2012q4
sample s1 1985q1 2012q4
smpl s0
equation eq1.arch(m=100,c=1e5,h,b) r1 c
equation eq2.arch(m=100,c=1e5,h,b) r2 c
coef(2) mu
mu(1) = eq1.c(1)
mu(2)= eq2.c(1)
coef(3) omega
omega(1)=eq1.c(2)
omega(2)=0
omega(3)=eq2.c(2)
coef(3) alpha
alpha(1) = eq1.c(3)
alpha(2) = eq2.c(3)
alpha(3) = (alpha(1)*alpha(2))^.5
coef(3) beta
beta(1)= eq1.c(4)
beta(2)= eq2.c(4)
beta(3) = (beta(1)*beta(2))^.5
!mlog2pi = 2*log(2*@acos(1))
series cov_r1r2 = @cov(r1mu(1), r2mu(2))
series var_r1 = @var(r1)
series var_r2 = @var(r2)
series sqres1 = (r1mu(1))^2
series sqres2 = (r2mu(2))^2
series res1res2 = (r1mu(1))*(r2mu(2))
logl bvgarch
bvgarch.append @logl logl
bvgarch.append sqres1 = (r1mu(1))^2
bvgarch.append sqres2 = (r2mu(2))^2
bvgarch.append res1res2 = (r1mu(1))*(r2mu(2))
bvgarch.append var_r1 = omega(1)+beta(1)*var_r1(1) + alpha(1)*sqres1(1)
bvgarch.append var_r2 = omega(3)+beta(2)*var_r2(1) + alpha(2)*sqres2(1)
bvgarch.append cov_r1r2 = omega(2) +beta(3)*cov_r1r2(1) + alpha(3)*res1res2(1)
bvgarch.append deth = var_r1*var_r2 cov_r1r2^2
bvgarch.append invh1 = var_r2/deth
bvgarch.append invh3 = var_r1/deth
bvgarch.append invh2 = cov_r1r2/deth
bvgarch.append logl =0.5*(!mlog2pi +(invh1*sqres1+2*invh2*res1res2 +invh3*sqres2)+ log(deth))
smpl s1
bvgarch.ml(showopts, m=100, c=1e5,b)
series res1 = sqres1^.5
series res2 = sqres2^.5
series stres1 = res1 /(var_r1 ^ .5)
series stres2 = res2 /(var_r2 ^ .5)
series sqres1st = stres1^2
series sqres2st = stres2^2
series stres1res2 = res1*res2 /
(var_r1*var_r2)^.5
graph resids1.line stres1 r1
show resids1
graph resids2.line stres2 r2
show resids2
show bvgarch.output
graph varcov.line var_r1 var_r2 cov_r1r2
i also have the same problem. i try to solve but it doesn't work! could anyone help ASAP!
i'd like to estimate from 1981q1 to 2012q4.
here my model
smpl @all
series r1 = lncpilncpi(1)
series r2 = lngdplncpi(1)
sample s0 1981q1 2012q4
sample s1 1985q1 2012q4
smpl s0
equation eq1.arch(m=100,c=1e5,h,b) r1 c
equation eq2.arch(m=100,c=1e5,h,b) r2 c
coef(2) mu
mu(1) = eq1.c(1)
mu(2)= eq2.c(1)
coef(3) omega
omega(1)=eq1.c(2)
omega(2)=0
omega(3)=eq2.c(2)
coef(3) alpha
alpha(1) = eq1.c(3)
alpha(2) = eq2.c(3)
alpha(3) = (alpha(1)*alpha(2))^.5
coef(3) beta
beta(1)= eq1.c(4)
beta(2)= eq2.c(4)
beta(3) = (beta(1)*beta(2))^.5
!mlog2pi = 2*log(2*@acos(1))
series cov_r1r2 = @cov(r1mu(1), r2mu(2))
series var_r1 = @var(r1)
series var_r2 = @var(r2)
series sqres1 = (r1mu(1))^2
series sqres2 = (r2mu(2))^2
series res1res2 = (r1mu(1))*(r2mu(2))
logl bvgarch
bvgarch.append @logl logl
bvgarch.append sqres1 = (r1mu(1))^2
bvgarch.append sqres2 = (r2mu(2))^2
bvgarch.append res1res2 = (r1mu(1))*(r2mu(2))
bvgarch.append var_r1 = omega(1)+beta(1)*var_r1(1) + alpha(1)*sqres1(1)
bvgarch.append var_r2 = omega(3)+beta(2)*var_r2(1) + alpha(2)*sqres2(1)
bvgarch.append cov_r1r2 = omega(2) +beta(3)*cov_r1r2(1) + alpha(3)*res1res2(1)
bvgarch.append deth = var_r1*var_r2 cov_r1r2^2
bvgarch.append invh1 = var_r2/deth
bvgarch.append invh3 = var_r1/deth
bvgarch.append invh2 = cov_r1r2/deth
bvgarch.append logl =0.5*(!mlog2pi +(invh1*sqres1+2*invh2*res1res2 +invh3*sqres2)+ log(deth))
smpl s1
bvgarch.ml(showopts, m=100, c=1e5,b)
series res1 = sqres1^.5
series res2 = sqres2^.5
series stres1 = res1 /(var_r1 ^ .5)
series stres2 = res2 /(var_r2 ^ .5)
series sqres1st = stres1^2
series sqres2st = stres2^2
series stres1res2 = res1*res2 /
(var_r1*var_r2)^.5
graph resids1.line stres1 r1
show resids1
graph resids2.line stres2 r2
show resids2
show bvgarch.output
graph varcov.line var_r1 var_r2 cov_r1r2
Who is online
Users browsing this forum: No registered users and 20 guests