Missing values in LOGL series under Bi-variate GARCH

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Thu Jun 04, 2009 3:43 am

Hi all,
I am estimating Dynamic Conditional Correlation under Bi-variate GARCH in Eviews-5. 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

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Missing values in LOGL series under Bi-variate GARCH

Postby trubador » Thu Jun 04, 2009 4:55 am

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.

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Thu Jun 04, 2009 5:04 am

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.

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Missing values in LOGL series under Bi-variate GARCH

Postby trubador » Fri Jun 05, 2009 12:09 am

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).

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Fri Jun 05, 2009 11:52 pm

Hi ,

Find attached the workfile where I was trying to get Dynamic Conditional Correlation under Bi-variate 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.

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Missing values in LOGL series under Bi-variate GARCH

Postby trubador » Sat Jun 06, 2009 12:38 am

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).

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Sat Jun 06, 2009 3:36 am

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(1-T(1)-T(2)+T(1)*(z1(-1)^2)+T(2)*var_z1t(-1),1)
dcc.append var_z2t=@nan(1-T(1)-T(2)+T(1)*(z2(-1)^2)+T(2)*var_z2t(-1),1)
dcc.append cov_z1tz2t=@nan((1-T(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^2-2*rho12*z1*z2)/detrRt)-10*pen

sample s1
scalar pi=3.14159


smpl s1
dcc.ml(showopts, m=500, c=1e-5)
show dcc.output

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Missing values in LOGL series under Bi-variate GARCH

Postby trubador » Sat Jun 06, 2009 4:30 am

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:

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 1370 times

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Sat Jun 06, 2009 8:50 am

Thanks a lot. I shall get back to you again if I come across the same problem.

Thank you again

best regards
Atish

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Sun Jun 21, 2009 9:34 pm

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

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Missing values in LOGL series under Bi-variate GARCH

Postby trubador » Mon Jun 22, 2009 11:42 am

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.

Atish Kumar Dash
Posts: 10
Joined: Tue Jun 02, 2009 3:57 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby Atish Kumar Dash » Wed Jun 24, 2009 11:16 pm

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

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Missing values in LOGL series under Bi-variate GARCH

Postby trubador » Thu Jun 25, 2009 2:45 am

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 "ARCH-Conditional Heteroskedasticity" for multivariate ARCH modeling. I've already uploaded a sample workfile in the 8th post of this thread.

marta
Posts: 8
Joined: Mon Jul 27, 2009 2:54 pm
Contact:

Re: Missing values in LOGL series under Bi-variate GARCH

Postby marta » Sat Aug 08, 2009 2:59 am

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 "ARCH-Conditional 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))?

cheri
Posts: 1
Joined: Thu Dec 13, 2012 9:18 am

Re: Missing values in LOGL series under Bi-variate GARCH

Postby cheri » Thu Dec 13, 2012 10:20 am

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 = lncpi-lncpi(-1)
series r2 = lngdp-lncpi(-1)

sample s0 1981q1 2012q4
sample s1 1985q1 2012q4

smpl s0

equation eq1.arch(m=100,c=1e-5,h,b) r1 c
equation eq2.arch(m=100,c=1e-5,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(r1-mu(1), r2-mu(2))
series var_r1 = @var(r1)
series var_r2 = @var(r2)

series sqres1 = (r1-mu(1))^2
series sqres2 = (r2-mu(2))^2
series res1res2 = (r1-mu(1))*(r2-mu(2))

logl bvgarch
bvgarch.append @logl logl
bvgarch.append sqres1 = (r1-mu(1))^2
bvgarch.append sqres2 = (r2-mu(2))^2
bvgarch.append res1res2 = (r1-mu(1))*(r2-mu(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=1e-5,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


Return to “Estimation”

Who is online

Users browsing this forum: Google [Bot] and 12 guests