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.
programming MLE using data series at different frequencies
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: programming MLE using data series at different frequencies
Everything will have to be on the same page, so yeah, a link is the best way to go.
Follow us on Twitter @IHSEViews
Re: programming MLE using data series at different frequencies
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
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: programming MLE using data series at different frequencies
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
Re: programming MLE using data series at different frequencies
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: programming MLE using data series at different frequencies
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?"
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
Re: programming MLE using data series at different frequencies
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
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: programming MLE using data series at different frequencies
As far as I know all univariate MIDAS estimation (with the exception of GARCH) requires lower frequency dependent variable.
Follow us on Twitter @IHSEViews
Re: programming MLE using data series at different frequencies
Thanks. Best, BA
-
- Posts: 2
- Joined: Wed Jun 23, 2021 9:31 am
Re: programming MLE using data series at different frequencies
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.
Who is online
Users browsing this forum: No registered users and 26 guests