## 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

correlation thesis
Posts: 1
Joined: Fri Feb 28, 2014 6:30 am

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

hello,
same probem. Im doing a dissertation on the correlation btw gold and sp500.
please find attached the prgram and file

hope you can help me

tks
Attachments
program.prg
etude2.wf1

misscats
Posts: 29
Joined: Wed Mar 19, 2014 8:37 am

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

Hi, first of all, thanks for many of you contributing a lot of discussion in order to help me solve my problems step by step.

I use Atish's code and modify it for my own need.
The code works fine if my first equation's independent variables are ftallsh fx ir smb hml mom dummy1
However, I want to set the first equation's independent variables as ftallsh fx(-1) ir smb hml mom dummy1
In that case, the code is not working with the error:
Missing values in @LOGL series at current coefficients at observation 2 in "DO_ DCC.ML(SHOWOPTS, M=500, C=1E-5)".

I think this is to do with the issue that i use a lag term of fx in the first equation.
Why would this occur an error and how to solve it?

I attach my workfile and codes here.

Code: Select all

`load 15daysgap_undated.wf1series y1=bm19series y2=fxsample s1 1 @lastsmpl s1scalar pi=3.14159group indepvars1 ftallsh fx(-1) ir smb hml mom dummy1    group indepvars2 fx(-1)'equation eq_r1.arch(1,1,m=1000,h) r1 c'equation eq_r2.arch(1,1,m=1000,h) r2 cequation eq1.ARCH(THRSH=1,GED,ARCHM=VAR,S=0,BACKCAST=0.7,DERIV=AA, m=100, c=1e-5) y1 C INDEPVARS1 @ DUMMY1equation eq2.ARCH(THRSH=1,GED,ARCHM=VAR,S=0,BACKCAST=0.7,DERIV=AA, m=100, c=1e-5) y2 C INDEPVARS2 eq1.makeresids(s) z1eq2.makeresids(s) z2eq1.makegarch() garch1eq2.makegarch() garch2scalar var_z1=@var(z1)scalar var_z2=@var(z2)scalar cov_z1z2=@cov(z1,z2)scalar corr12=@cor(z1,z2)series var_z1t=var_z1series var_z2t=var_z2series cov_z1tz2t=cov_z1z2'new addedseries sqresneg1 = (z1<0)^2series sqresneg2 = (z2<0)^2'------coef(4) TT(1)=0.2T(2)=0.7T(3)=0.8 'tarch T(4)=0.2 'dummy1logl dccdcc.append @logl logldcc.append var_z1t=@nan(1-T(1)-T(2)+T(1)*(z1(-1)^2)+T(2)*var_z1t(-1) +T(3)*var_z1t(-1)*sqresneg1(-1)+T(4)*dummy1,1)dcc.append var_z2t=@nan(1-T(1)-T(2)+T(1)*(z2(-1)^2)+T(2)*var_z2t(-1) +T(3)*var_z2t(-1)*sqresneg2(-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*pensample s2 2 @lastsmpl s2dcc.ml(showopts, m=500, c=1e-5)show dcc.output`
Attachments
15daysgap_undated.wf1

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

As I already mentioned in this post and have reiterated here, this is an issue of sample adjustment. Since you are using fx(-1), you loose the observation at the beginning. All you have to do is change the following line:

Code: Select all

`sample s2 3 @last`

Other than that, in order to ease estimation and/or convergence problems, I recommend the use of DCCGARCH11 add-in for these type of models.

misscats
Posts: 29
Joined: Wed Mar 19, 2014 8:37 am

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

trubador wrote:As I already mentioned in this post and have reiterated here, this is an issue of sample adjustment. Since you are using fx(-1), you loose the observation at the beginning. All you have to do is change the following line:

Code: Select all

`sample s2 3 @last`

Other than that, in order to ease estimation and/or convergence problems, I recommend the use of DCCGARCH11 add-in for these type of models.

Many thanks trubador. I replaced the line with your suggestion and it works. The reason I don't understand is that why it is sample s2 3 @last, not sample s2 2 @last.
As you can see, the beginning sample is sample s1 from 1 to @last. After the equation, the first observation is gone so my sample s2 is set from 2 to @last. Why is that from 3 to @last? This is the bit I don't understand.

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

Log likelihood specification is actually a series and is determined by an explicit formula, which depends on the lags of its own as well as other variables. Therefore it needs an initial value to start the iteration, which may require a different sample period than already defined.

I am fully aware of your confusion and that is also why I am trying to point you in the right direction. This is a common issue that many EViews users encounter at some point. You should really figure it out on your own in order to better understand ML-type modeling in EViews.

misscats
Posts: 29
Joined: Wed Mar 19, 2014 8:37 am

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

Thanks trubador. I appreciated your help very much. It is very helpful to have this forum and you here. I am learning more and more now.

inaani
Posts: 4
Joined: Fri May 23, 2014 8:12 am

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

trubador wrote:As I already mentioned in this post and have reiterated here, this is an issue of sample adjustment. Since you are using fx(-1), you loose the observation at the beginning. All you have to do is change the following line:

Code: Select all

`sample s2 3 @last`

Other than that, in order to ease estimation and/or convergence problems, I recommend the use of DCCGARCH11 add-in for these type of models.

Dear trubator,
I take the daily historical prices but it seems that there are some problems when I import them in eviews in both of cases(5 or 7 days ).
can you tell me please how to import the prices from yahoo finance ?
Thank you very much

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

I do not know of any special or specific way of importing data from that source. You should also provide more and detailed information as to what you mean by "some problems".

inaani
Posts: 4
Joined: Fri May 23, 2014 8:12 am

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

trubador wrote:I do not know of any special or specific way of importing data from that source. You should also provide more and detailed information as to what you mean by "some problems".

First of all I want to thank you for the response.
The problem is that when I download the stock index prices on excel I see that they are not availaible on holidays, and I want to know if there is a way in eviews 5 that modify or does not take in consideration these days.

Thank you very much!

startz
Non-normality and collinearity are NOT problems!
Posts: 3523
Joined: Wed Sep 17, 2008 2:25 pm

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

You might consider making an undated workfile.

inaani
Posts: 4
Joined: Fri May 23, 2014 8:12 am

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

startz wrote:You might consider making an undated workfile.

Thank you startz, but I think that without the sample I can't generate nothing. I saw some discussions in this forum about deleting the NA values from the workfile but I didn't understood how to do it

wuyunting
Posts: 2
Joined: Fri Jul 25, 2014 5:33 am

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

Hello, I am working on my dissertation and have been stressing out for a few days since I cannot solve the problem of missing value of log@L . I hope you can help me out with this.In my ideal system, the first dependent variable should have the conditional mean equation : Y1=dummy+lambda*GARCH and other dependent variables with autoregressive effect XiC = a +b*dummy+ c*X1C(-1) + d*X2C(-1)+ g*Y1(-1)The variance equation is: H(R+1)=omega*omega' + beta*H(-1)*beta' + alpha*res(-1)*res(-1)'*alpha. I really have no idea how to solve this missing value and I uploaded my program and workfile. Please have a look. Thank you!
Attachments
try.prg
try2.wf1

sammy66
Posts: 2
Joined: Wed Jul 30, 2014 12:20 am

### Re: Missing values in LOGL series under Bi-variate 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.
______________
daily deals, online shopping sites, hot deals, best deals

EconL
Posts: 3
Joined: Wed Jan 10, 2018 6:51 am

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

Hi,

i´m facing a similar problem like the guys above.
Im trying to do a dcc garch to examine the correlation of stock markets from 2000 to 2018. I used my code for another study before without any problems, but this time i always get an "Missing valuesin @LOGL series at current coefficients at observation 5/03/2004 in "DO_DCC.ML(B,SHOWOPTS,M=1000,C=1E-5"."

I searched for a while now, but i couldn´t find any solution. Changing the sample period e.g. just leads to the same error with a different date.

Could someone help me or at least give me a hint what causes the error?

Lukas
Attachments
dcc garch program.prg