programming MLE using data series at different frequencies

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

programming MLE using data series at different frequencies

Postby KarinL » Thu Feb 03, 2011 9:22 am

I've just started programming in EViews7. I want to estimate a GARCH-MIDAS model with maximum likelihood methods, i.e. using a Logl Object. The series for this objetc are at daily frequency.
However, one model equation concerns a variable at a lower (quarterly) frequency. This variable is then converted to a daily frequency, holding it constant over days of one quarter.
I thought about switching between two workfile pages (daily and quarterly) in the program. But I am not sure whether EViews can solve the Logl, when its coefficients were declared in different workfile pages.
Maybe I need to link the objetc?
I'd be thankful for any comments.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: programming MLE using data series at different frequencies

Postby EViews Gareth » Thu Feb 03, 2011 9:29 am

Everything will have to be on the same page, so yeah, a link is the best way to go.
Follow us on Twitter @IHSEViews

KarinL
Posts: 25
Joined: Thu Feb 03, 2011 8:45 am

Re: programming MLE using data series at different frequencies

Postby KarinL » Thu Feb 03, 2011 9:41 am

Thanks for the quick reply. I added my actual code, where i have just been copying the variable from one page to another.
I'm not quite sure how linking would work here. My problem are the coefficients c5,c6,c7 which are used in the quarterly page,
whereas i'm estimating the logl in the daily page. Does anyone have any hints how to work that out? Thanks!

genr y={%0}
genr y2= y^2
!years =@val(%1)

copy(c=s) daily\y2 quarterly\rv

' starting values
param c(1) 0.1 c(2) .1 c(3) .8 c(5) 0 c(6) 0.01 c(7) 10

pageselect quarterly
genr tau= c(5)

for !k=1 to (!years-1)
!phi = 0
for !j=1 to (!years-1)
!phi = !phi + (1- !j /!years)^(c(7) - 1)
next

genr tau = tau + c(6) * (1/!phi * (1- !k/!years)^(c(7) - 1) ) * rv(-!k)
next

copy quarterly\tau daily\tau

pageselect daily

logl midas
midas.append @logl llmid

midas.append g = @nan( 1 - c(2) - c(3) + c(2) * 1/tau(-1) * ( y(-1) - c(1) )^2+ c(3) * g(-1) , 1)
midas.append llmid = @nan( - 0.5 * log(g) - 0.5* log(tau) - 0.5 * 1/(tau*g) *( y - c(1) )^2 , 1)
midas.ml

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: programming MLE using data series at different frequencies

Postby EViews Gareth » Thu Feb 03, 2011 9:54 am

If you want to estimate the LogL on the daily page, then everything has to be on the daily page.
Follow us on Twitter @IHSEViews

adrangi
Posts: 31
Joined: Sat Dec 05, 2009 5:56 pm

Re: programming MLE using data series at different frequencies

Postby adrangi » Tue Mar 30, 2021 11:59 am

Hi. I've used R to run a GARCH MIDAS estimation. However, seems to have problems if I bring in data with monthly and weekly for daily volatility series estimation. Were you able to get GARCH MIDAS to run on Eviews? If so would you be willing to share it? Do Eviews developers plan to expand the existing MIDAS regression to GARCH MIDAS. Furthermore, the current MIDAS Regression procedure seems to be limited to mixing higher frequency data in low frequency regression. What about lower frequency data when the dependent variable series in higher frequency? Thoughts? Thanks. BA

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: programming MLE using data series at different frequencies

Postby EViews Gareth » Tue Mar 30, 2021 12:16 pm

It is on a long list to add MIDAS GARCH, but when we've looked into it previously, it seems that the objective functions are notoriously difficult to maximise and then implementations available fail often. We're a little reluctant to offer an estimator that fails to find an estimate most of the time.

Do you have a specific MIDAS model in mind when you say "What about lower frequency data when the dependent variable series in higher frequency?"
Follow us on Twitter @IHSEViews

adrangi
Posts: 31
Joined: Sat Dec 05, 2009 5:56 pm

Re: programming MLE using data series at different frequencies

Postby adrangi » Tue Mar 30, 2021 3:57 pm

Thanks for the quick reply. Even the one I did on R was a bit problematic.

I didn't even attempt to do the MIDAS regression. I wanted to run a regression of daily volatility of S&P on daily interest rates, and things like consumer confidence, industrial production and other low frequency series. However, when I read that the dependent variable is expected to be low frequency, I didn't dig further. Am I misunderstanding the procedure? Thanks. Best, BA

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: programming MLE using data series at different frequencies

Postby EViews Gareth » Tue Mar 30, 2021 4:13 pm

As far as I know all univariate MIDAS estimation (with the exception of GARCH) requires lower frequency dependent variable.
Follow us on Twitter @IHSEViews

adrangi
Posts: 31
Joined: Sat Dec 05, 2009 5:56 pm

Re: programming MLE using data series at different frequencies

Postby adrangi » Wed Mar 31, 2021 1:50 pm

Thanks. Best, BA

flower2310
Posts: 2
Joined: Wed Jun 23, 2021 9:31 am

Re: programming MLE using data series at different frequencies

Postby flower2310 » Wed Jun 23, 2021 11:32 am

adrangi wrote:Hi. I've used R to run a GARCH MIDAS estimation. However, seems to have problems if I bring in data with monthly and weekly for daily volatility series estimation. Were you able to get GARCH MIDAS to run on Eviews? If so would you be willing to share it? Do Eviews developers plan to expand the existing MIDAS regression to GARCH MIDAS. Furthermore, the current MIDAS Regression procedure seems to be limited to mixing higher frequency data in low frequency regression. What about lower frequency data when the dependent variable series in higher frequency? Thoughts? Thanks. BA


Hi, I would like to use eviews and estimate a model of garch-Midas using volatility of stocks and accounting information. I ve searched for package in R, and I found some interesting. I hope that I could do something in eviews11 or R.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 20 guests