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

 Posts: 1
 Joined: Fri Feb 28, 2014 6:30 am
Re: Missing values in LOGL series under Bivariate 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
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
 (2.18 KiB) Downloaded 144 times

 etude2.wf1
 (22 KiB) Downloaded 134 times
Re: Missing values in LOGL series under Bivariate 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=1E5)".
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.
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=1E5)".
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.wf1
series y1=bm19
series y2=fx
sample s1 1 @last
smpl s1
scalar pi=3.14159
group 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 c
equation eq1.ARCH(THRSH=1,GED,ARCHM=VAR,S=0,BACKCAST=0.7,DERIV=AA, m=100, c=1e5) y1 C INDEPVARS1 @ DUMMY1
equation eq2.ARCH(THRSH=1,GED,ARCHM=VAR,S=0,BACKCAST=0.7,DERIV=AA, m=100, c=1e5) y2 C INDEPVARS2
eq1.makeresids(s) z1
eq2.makeresids(s) z2
eq1.makegarch() garch1
eq2.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
'new added
series sqresneg1 = (z1<0)^2
series sqresneg2 = (z2<0)^2
'
coef(4) T
T(1)=0.2
T(2)=0.7
T(3)=0.8 'tarch
T(4)=0.2 'dummy1
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) +T(3)*var_z1t(1)*sqresneg1(1)+T(4)*dummy1,1)
dcc.append var_z2t=@nan(1T(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((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 s2 2 @last
smpl s2
dcc.ml(showopts, m=500, c=1e5)
show dcc.output
 Attachments

 15daysgap_undated.wf1
 (16.06 KiB) Downloaded 113 times
Re: Missing values in LOGL series under Bivariate 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:
Other than that, in order to ease estimation and/or convergence problems, I recommend the use of DCCGARCH11 addin for these type of models.
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 addin for these type of models.
Re: Missing values in LOGL series under Bivariate 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 addin 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.
Re: Missing values in LOGL series under Bivariate 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 MLtype modeling in EViews.
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 MLtype modeling in EViews.
Re: Missing values in LOGL series under Bivariate 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.
Re: Missing values in LOGL series under Bivariate 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 addin 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
Re: Missing values in LOGL series under Bivariate 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".
Re: Missing values in LOGL series under Bivariate 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!

 Nonnormality and collinearity are NOT problems!
 Posts: 3390
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Missing values in LOGL series under Bivariate GARCH
You might consider making an undated workfile.
Re: Missing values in LOGL series under Bivariate 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
Re: Missing values in LOGL series under Bivariate 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!
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.
______________
daily deals, online shopping sites, hot deals, best deals
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
Re: Missing values in LOGL series under Bivariate 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=1E5"."
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?
Thanks in Advance,
Lukas
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=1E5"."
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?
Thanks in Advance,
Lukas
 Attachments

 dcc garch program.prg
 (4.44 KiB) Downloaded 25 times

 Model Workfile.WF1
 (388.77 KiB) Downloaded 17 times
Who is online
Users browsing this forum: No registered users and 10 guests